rdf-object-proxy
A proxy for the rdf-object library to match the LDflex API
Usage
import { RdfObjectProxy } from 'rdf-object-proxy';
import { RdfObjectLoader } from 'rdf-object';
const context = {
"@context": {
"@vocab": "http://www.w3.org/ns/shacl#",
rdf: "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
sh$property: "property",
mf: "http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#",
include: "mf:include",
entries: "mf:entries",
},
};
(async () => {
const loader = new RdfObjectLoader({ context });
await loader.importArray(quads /* array of rdf-js compliant quads */);
const resource =
loader.resources['http://example.org/Jesse'];
return RdfObjectProxy(resource);
})();
License
©2021–present Jesse Wright. MIT License.