# @rdfjs/dataset

> An indexed implementation of the RDF/JS Dataset

Latest version **2.0.3** (published 2026-07-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install @rdfjs/dataset
pnpm add @rdfjs/dataset
yarn add @rdfjs/dataset
bun add @rdfjs/dataset
```

Provides the command `rdfjs-dataset-test`.

## Health

**Score 68/100 (B)** — status: active.

Positive: has types package; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.0.3 |
| Published | 2026-07-05 |
| First published | 2019-04-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/rdfjs__dataset) |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 31.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 12 |
| Author | Thomas Bergwinkl |
| Maintainers | bergos, matthieubosquet |
| Keywords | dataset, rdf, rdfjs |

## Links

- npm: https://www.npmjs.com/package/@rdfjs/dataset
- Repository: https://github.com/rdfjs-base/dataset
- Issues: https://github.com/rdfjs-base/dataset/issues
- npm.io page: https://npm.io/package/@rdfjs/dataset

## Recent versions

- 2.0.3 (latest) — 2026-07-05
- 2.0.2 — 2024-02-09
- 2.0.1 — 2022-04-10
- 2.0.0 — 2021-12-29
- 1.1.1 — 2021-06-21
- 1.1.0 — 2021-03-11
- 1.0.1 — 2019-07-29
- 1.0.0 — 2019-04-04

## README

# @rdfjs/dataset
[![build status](https://img.shields.io/github/actions/workflow/status/rdfjs-base/dataset/test.yaml?branch=master)](https://github.com/rdfjs-base/dataset/actions/workflows/test.yaml)
[![npm version](https://img.shields.io/npm/v/@rdfjs/dataset.svg)](https://www.npmjs.com/package/@rdfjs/dataset)

An indexed implementation of the [RDF/JS Dataset](https://rdf.js.org/dataset-spec/) based on the great work by [Ruben Verborgh](https://github.com/RubenVerborgh) in [N3.js](https://github.com/rdfjs/N3.js).

## Usage

Use the following command to add the package as a dependency to your project:

```bash
npm install @rdfjs/dataset --save
```

The main entry point of the package exports an [RDF/JS DatasetCoreFactory](https://rdf.js.org/dataset-spec/#datasetcorefactory-interface) instance.
See the following lines on how to import and use the library:

```
import dataFactory from '@rdfjs/data-model'
import datasetFactory from '@rdfjs/dataset'

const quad = dataFactory.quad(
  dataFactory.blankNode(),
  dataFactory.namedNode('http://schema.org/name'),
  dataFactory.literal('RDF/JS Dataset')
)

const dataset = datasetFactory.dataset([quad])
```

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