2.0.3-ontologies-2 • Published 6 years ago

n-quads-parser v2.0.3-ontologies-2

Weekly downloads
51
License
MIT
Repository
github
Last release
6 years ago

NQuads parser

This is a basic, but fast pure-js n-quads parser. It has no dependencies to node and can be run in the browser without any additional packages.

Installation

yarn add n-quads-parser

npm i n-quads-parser

Usage

This was written as a faster n-quads parser for link-lib and designed to work with rdflib.js.

If you're looking for a way to build linked-data enabled RDF applications fast, check out link-redux.

RDFlib doesn't have (at the time of writing) dependency injection, one must either fork and modify rdflib or use our fork. Note that the latter has performance patches over the native RDFlib, but is also more strict in object creation.

Plain javascript:

import { IndexedFormula } from 'rdflib';

// Doesn't have to be from rdflib, check the parser file for the handful methods required
const store = new IndexedFormula();
const parser = new NQuadsParser();

fetch(url)
  .then((req) => req.text())
  .then((body) => parser.loadBuf(body));

// The statements should be loaded into the store.

TODO:

2.1.1

6 years ago

2.1.0

6 years ago

2.1.0-3

6 years ago

2.1.0-2

6 years ago

2.1.0-1

6 years ago

2.1.0-0

6 years ago

2.0.3-ontologies

6 years ago

2.0.3

7 years ago

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.3.0

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago