@rdfdev/delta
v1.2.3
Published
Toolkit for working with linked-deltas
Downloads
16
Maintainers
Readme
js.rdf.dev/delta
Utilities to quickly create linked deltas, an rdf-native way to express and process changes in state.
Example
import rdf from "@ontologies/core";
import schema from "@ontologies/schema";
import { add, replace } from "@rdfdev/delta";
import { RDFStore } from "link-lib";
const myProfile = rdf.namedNode("https://example.com/profile/card#me");
const updateName = [
replace(myProfile, schema.name, rdf.literal("Douglas Engelbart")),
add(myProfile, schema.comment, rdf.literal("Update from today")),
];
new RDFStore().processDelta(updateName) // Changes applied
Getting started
Just install the package and its peer dependencies.
npm i @rdfdev/delta @ontologies/core @ontologies/ld
yarn add @rdfdev/delta @ontologies/core @ontologies/ld
Documentation
See the js.rdf.dev/delta documentation
See the complete js.rdf.dev documentation
Need help with linked data?
This package is brought to you by Ontola. We build production-grade linked data solutions and can help you from advice to building custom web services.