hyperfact

v0.1.0-alpha.7
Store data as a unified JSON-LD graph.
json-ld linked data rdf store solid

Hyperfact

Store data as a unified JSON-LD graph.

This experimental. Expect things to change.

Quick start

import createStore from "hyperfact";

const facts = createStore();

// add facts to the store (this is async!)
facts.merge({
              "@context": "http://schema.org/",
              "@id": "https://people.example/profile/jane#me",
              "@type": "Person",
              "name": "Jane Doe",
              "jobTitle": "Professor",
            });
            
// subscribe to changes
facts.subscribe('https://people.example/profile/jane#me', (current, prev) => {
  console.log('updated', {current, prev});
});

// get facts
const data = facts.getResource('https://people.example/profile/jane#me');
console.log()
npm i hyperfact

Metadata

  • MIT
  • Whatever
  • Angelo Veltens
  • released 4/24/2019

Downloads

Maintainers