# rdf-store-stream

> Create an RDF store from an RDF stream

Latest version **3.0.0** (published 2025-01-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install rdf-store-stream
pnpm add rdf-store-stream
yarn add rdf-store-stream
bun add rdf-store-stream
```

## Health

**Score 45/100 (D)** — status: stable.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2025-01-08 |
| First published | 2019-05-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 7.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Ruben Taelman |
| Maintainers | rubensworks |
| Keywords | rdf, source, stream, rdfjs, linked data |

## Links

- npm: https://www.npmjs.com/package/rdf-store-stream
- Repository: https://github.com/rubensworks/rdf-store-stream.js
- Homepage: https://github.com/rubensworks/rdf-store-stream.js#readme
- Issues: https://github.com/rubensworks/rdf-store-stream.js/issues
- Funding: https://github.com/sponsors/rubensworks/
- npm.io page: https://npm.io/package/rdf-store-stream

## Dependencies (1)

- [rdf-stores](https://npm.io/package/rdf-stores.md) ^2.0.0

## Alternatives

- [byte-size](https://npm.io/package/byte-size.md) — 2.1M weekly downloads
- [speed-limiter](https://npm.io/package/speed-limiter.md) — 16.0K weekly downloads
- [@powersync/node](https://npm.io/package/@powersync/node.md) — 10.9K weekly downloads
- [@ledgerhq/coin-cardano](https://npm.io/package/@ledgerhq/coin-cardano.md) — 1.0K weekly downloads
- [@jayesol/jayeson.lib.streamfinder](https://npm.io/package/@jayesol/jayeson.lib.streamfinder.md) — 1.0K weekly downloads

## Recent versions

- 3.0.0 (latest) — 2025-01-08
- 2.0.1 — 2024-02-09
- 2.0.0 — 2023-06-27
- 1.3.1 — 2022-11-09
- 1.3.0 — 2021-08-11
- 1.2.0 — 2021-04-06
- 1.1.0 — 2020-09-16
- 1.0.1 — 2020-07-01
- 1.0.0 — 2019-05-29

## README

# RDF Store Stream

[![Build status](https://github.com/rubensworks/rdf-store-stream.js/workflows/CI/badge.svg)](https://github.com/rubensworks/rdf-store-stream.js/actions?query=workflow%3ACI)
[![Coverage Status](https://coveralls.io/repos/github/rubensworks/rdf-store-stream.js/badge.svg?branch=master)](https://coveralls.io/github/rubensworks/rdf-store-stream.js?branch=master)
[![npm version](https://badge.fury.io/js/rdf-store-stream.svg)](https://www.npmjs.com/package/rdf-store-stream)

This package exposes a convenience function that allows [RDF(JS) streams](http://rdf.js.org/stream-spec/#stream-interface)
to be encapsulated into an [RDF(JS) store](http://rdf.js.org/stream-spec/#store-interface).

The Store that will be returned is the default store from [`rdf-stores`](https://www.npmjs.com/package/rdf-stores).

This library accepts [RDFJS](http://rdf.js.org/)-compliant quads.

## Installation

```bash
$ yarn install rdf-store-stream
```

This package also works out-of-the-box in browsers via tools such as [webpack](https://webpack.js.org/) and [browserify](http://browserify.org/).

## Require

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

_or_

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

## Usage

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

## License
This software is written by [Ruben Taelman](http://rubensworks.net/).

This code is released under the [MIT license](http://opensource.org/licenses/MIT).

---
_Source: https://npm.io/package/rdf-store-stream · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
