Prez logoPrez

Prez Lib

The JavaScript library for Prez UI

A JS library for processing RDF data for use with Prez UI, implementing RDF/JS and N3.js.

Installing

npm install prez-lib

Example Usage

Using the factory functions:

import { literal, node } from "prez-lib";

const term = node({
    value: "https://example.com",
    label: literal("term"),
    links: [
        {
            value: "/"
        }
    ],
});

Using the store class:

import { RDFStore } from "prez-lib";

const data = "<https://example.com/subject> <https://example.com/predicate> <https://example.com/object> .";
const store = new RDFStore();
store.load(data);
const item = store.getItem();