Skip to content

Commit

Permalink
Merge pull request #21 from pondersource/michielbdejong-patch-1
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
michielbdejong authored Nov 20, 2023
2 parents 133062c + 5637472 commit 431ec15
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ npm run build
### getTypeIndexFromProfile
Finds the URL of one of the type indexes, given the URL of the profile document.
Returns a string or throws an error, namely:

FIXME: Complete this list and create a unit test for each of them, ref https://github.com/pondersource/soukai-solid-utils/issues/17
If the webId URL is malformed then ...
If the profile document cannot be retrieved, then ...
If fetching the profile document times out based on the timeout of the Fetch function (?), then ...
If the profile document is not valid JSON-LD then ...
If the profile document does not contain a link to a type index of the requested type then ...
* If the webId URL is malformed then ...
* If the profile document cannot be retrieved, then ...
* If fetching the profile document times out based on the timeout of the Fetch function (?), then ...
* If the profile document is not valid JSON-LD then ...
* If the profile document does not contain a link to a type index of the requested type then ...

Example usage:
```
Expand All @@ -28,4 +29,4 @@ const args = {
};
const result = await getTypeIndexFromProfile(args as any);
expect(result).toBe("https://michielbdejong.solidcommunity.net/settings/publicTypeIndex.ttl");
```
```

0 comments on commit 431ec15

Please sign in to comment.