Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

@rdfdev/delta

1.0.0 • 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.

Install

npm i @rdfdev/delta

DownloadsWeekly Downloads

63

Version

1.0.0

License

MIT

Unpacked Size

16.9 kB

Total Files

11

Last publish

Collaborators

  • avatar