# @rdfjs/term-set

> Set for RDF/JS Terms

Latest version **2.0.3** (published 2024-06-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install @rdfjs/term-set
pnpm add @rdfjs/term-set
yarn add @rdfjs/term-set
bun add @rdfjs/term-set
```

## Health

**Score 43/100 (D)** — status: abandoned.

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

Warnings: low downloads.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.0.3 |
| Published | 2024-06-02 |
| First published | 2019-09-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/rdfjs__term-set) |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 15.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Thomas Bergwinkl |
| Maintainers | bergos |
| Keywords | rdf, rdfjs, set, term |

## Links

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

## Dependencies (1)

- [@rdfjs/to-ntriples](https://npm.io/package/@rdfjs/to-ntriples.md) ^3.0.1

## Alternatives

- [localforage](https://npm.io/package/localforage.md) — 6.2M weekly downloads
- [localforage-observable](https://npm.io/package/localforage-observable.md) — 30.8K weekly downloads
- [@y/y](https://npm.io/package/@y/y.md) — 30.1K weekly downloads
- [@metaobjectsdev/render](https://npm.io/package/@metaobjectsdev/render.md) — 3.5K weekly downloads
- [@ledgerhq/coin-algorand](https://npm.io/package/@ledgerhq/coin-algorand.md) — 1.1K weekly downloads

## Recent versions

- 2.0.3 (latest) — 2024-06-02
- 2.0.2 — 2024-02-09
- 2.0.1 — 2022-04-10
- 2.0.0 — 2021-12-23
- 1.1.0 — 2021-07-01
- 1.0.2 — 2021-04-30
- 1.0.1 — 2020-03-12
- 1.0.0 — 2019-09-01

## README

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

A Set for [RDF/JS Terms](http://rdf.js.org/data-model-spec/#term-interface).

This package implements the JavaScript [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) interface exclusively for RDF/JS Terms and treats Terms with the same N-Triples representation as they are the same object.

## Usage

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

```bash
npm install @rdfjs/term-set --save
```

The package exports the constructor of the Term-Set.
New instances can be created just like JavaScript Sets:

```js
import rdf from '@rdfjs/data-model'
import TermSet from '@rdfjs/term-set'

const terms = new TermSet([
  rdf.namedNode('http://example.org/'),
  rdf.literal('test')
])

// The rdf factory will return a new instance of the literal,
// but the Term-Set will check for the N-Triple representation.
// That's why the output will be: "true"
console.log(terms.has(rdf.literal('test')))
```

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