Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@rdfjs/term-set

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rdfjs/term-set

Set for RDFJS Terms

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
18K
increased by20.55%
Maintainers
2
Weekly downloads
 
Created
Source

@rdfjs/term-set

A Set for RDFJS Terms.

This package implements the JavaScript Set interface exclusively for RDFJS Terms and treats Terms with the same N-Triples representation as they are the same object.

Usage

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

const rdf = require('@rdfjs/data-model')
const TermSet = require('@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')))

Keywords

FAQs

Package last updated on 12 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc