包详细信息

rdf-store-stream

rubensworks46.6kMIT3.0.0

Create an RDF store from an RDF stream

rdf, source, stream, rdfjs

自述文件

RDF Store Stream

Build status Coverage Status npm version

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.

Installation

$ yarn install rdf-store-stream

This package also works out-of-the-box in browsers via tools such as webpack and browserify.

Require

import {storeStream} from "rdf-store-stream";

or

const storeStream = require("rdf-store-stream").storeStream;

Usage

Short example:

const store = await storeStream(quadStream);

Full example:

// 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'));

License

This software is written by Ruben Taelman.

This code is released under the MIT license.

更新日志

Changelog

All notable changes to this project will be documented in this file.

v3.0.0 - 2025-01-08

BREAKING CHANGES

v2.0.1 - 2024-02-09

Fixed

v2.0.0 - 2023-06-27

Changed

v1.3.1 - 2022-11-09

Fixed

v1.3.0 - 2021-08-11

Changed

v1.2.0 - 2021-04-06

Changed

v1.1.0 - 2020-09-16

Changed

v1.0.1 - 2020-07-01

Changed

[v1.0.0] - 2019-05-29

Initial release