Standards FOAF Examples
These snippets demonstrate registering schema support and defining person records with common FOAF terms.
FoafDataTypes
import { FoafContexts, FoafDataTypes, FoafTypes, type IFoafPerson } from '@twin.org/standards-foaf';
FoafDataTypes.registerRedirects();
FoafDataTypes.registerTypes();
const person: IFoafPerson = {
'@context': FoafContexts.Context,
type: FoafTypes.Person,
name: 'Alex Example',
mbox: 'mailto:[email protected]'
};
console.log(person.type); // Person