Skip to content

Commit

Permalink
[util] add discovery of storage description
Browse files Browse the repository at this point in the history
  • Loading branch information
elf-pavlik committed Jun 26, 2023
1 parent 3349285 commit ce74c19
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/utils/src/link-header.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ export function getDescriptionResource(linkHeaderText: string): string {
return links.find((link) => link.rel === 'describedby')?.uri;
}

export function getStorageDescription(linkHeaderText: string): string {
const links = LinkHeader.parse(linkHeaderText).refs;
return links.find((link) => link.rel === 'http://www.w3.org/ns/solid/terms#storageDescription')?.uri;
}

export function targetDataRegistrationLink(dataRegistrationIri: string): string {
const link = new LinkHeader();
link.set({
Expand Down

0 comments on commit ce74c19

Please sign in to comment.