Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

jeswr/rdf-object-proxy

Repository files navigation

rdf-object-proxy

A proxy for the rdf-object library to match the LDflex API

GitHub license npm version build Dependabot semantic-release

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.

About

A proxy for the rdf-object library to match the LDflex API

Resources

License

Stars

Watchers

Forks

Packages

No packages published