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

@rdfjs/term-map

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rdfjs/term-map

Map for RDF/JS Terms keys

  • 1.1.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

@rdfjs/term-map

A Map for RDF/JS Terms keys.

This package implements the JavaScript Map interface exclusively for RDF/JS Terms keys and treats Terms with the same N-Triples representation as they are the same object.

Usage

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

const rdf = require('@rdfjs/data-model')
const TermMap = require('@rdfjs/term-map')

const terms = new TermMap([
  [rdf.namedNode('http://example.org/'), { data: 1 }],
  [rdf.literal('test'), { data: 2 }]
])

// The rdf factory will return a new instance of the literal,
// but the TermMap 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 01 Jul 2021

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