Create an RDF store from an RDF stream
npm install rdf-store-stream


This package exposes a convenience function that allows RDF(JS) streams
to be encapsulated into an RDF(JS) store.
The Store that will be returned is the default store from rdf-stores.
This library accepts RDFJS-compliant quads.
``bash`
$ yarn install rdf-store-stream
This package also works out-of-the-box in browsers via tools such as webpack and browserify.
`javascript`
import {storeStream} from "rdf-store-stream";
_or_
`javascript`
const storeStream = require("rdf-store-stream").storeStream;
Short example:
`javascript`
const store = await storeStream(quadStream);
Full example:
`javascript
// Create an RDF stream
import rdfParser from "rdf-parse";
const quadStream = rdfParser.parse(fs.createReadStream('cartoons.ttl'), { contentType: 'text/turtle' });
// Import the stream into a store
const store = await storeStream(quadStream);
// Use the store
const resultStream = store.match(namedNode('http://example.org/subject'));
``
This code is released under the MIT license.