Skip to content

Commit 408c0df

Browse files
profile module to get name from profile in an rdflib environment
1 parent d1fa005 commit 408c0df

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

profile/rdflib/profile-rdflib.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
const FOAF = $rdf.Namespace('http://xmlns.com/foaf/0.1/');
2+
const VCARD = $rdf.Namespace('http://www.w3.org/2006/vcard/ns#');
3+
4+
export default function getNameFromStore(store, webId) {
5+
return store.any($rdf.sym(webId), FOAF('name')) || store.any($rdf.sym(webId), VCARD('fn'));
6+
}

0 commit comments

Comments
 (0)