# @rdfjs/data-model

> A basic implementation of the RDF/JS Data Model

Latest version **2.1.2** (published 2026-06-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install @rdfjs/data-model
pnpm add @rdfjs/data-model
yarn add @rdfjs/data-model
bun add @rdfjs/data-model
```

Provides the command `rdfjs-data-model-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.1.2 |
| Published | 2026-06-30 |
| First published | 2018-07-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/rdfjs__data-model) |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 37.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 27 |
| Author | Thomas Bergwinkl |
| Maintainers | bergos, matthieubosquet |
| Keywords | data-model, rdf, rdfjs |

## Links

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

## Recent versions

- 2.1.2 (latest) — 2026-06-30
- 2.1.1 — 2025-06-22
- 2.1.0 — 2025-01-17
- 2.0.2 — 2024-02-09
- 2.0.1 — 2022-04-10
- 2.0.0 — 2021-12-29
- 1.3.4 — 2021-10-07
- 1.3.3 — 2021-07-13
- 1.3.2 — 2021-07-02
- 1.3.1 — 2021-06-30
- 1.3.0 — 2021-06-30
- 1.2.0 — 2020-09-02
- 1.1.2 — 2019-07-29
- 1.1.1 — 2018-11-07
- 1.1.0 — 2018-08-03
- … 1 more at https://npm.io/package/@rdfjs/data-model/versions

## README

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

A basic implementation of the [RDF/JS Data Model](http://rdf.js.org/data-model-spec/).

## Usage

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

```bash
npm install @rdfjs/data-model --save
```

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

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

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

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