@rdfdev/delta
TypeScript icon, indicating that this package has built-in type declarations

1.2.3 • Public • Published

js.rdf.dev/delta

Read the Docs npm (tag) npm bundle size

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.

Package Sidebar

Install

npm i @rdfdev/delta

Weekly Downloads

5

Version

1.2.3

License

MIT

Unpacked Size

15.9 kB

Total Files

10

Last publish

Collaborators

  • fletcher91