New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

rdf-quad

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rdf-quad

A convenience constructor for RDF quads

  • 1.5.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5.9K
decreased by-20.23%
Maintainers
1
Weekly downloads
 
Created
Source

RDF Quad

npm version

A convenience constructor for RDF quads based on string-based terms, as done by RDF-String.

If the value in the object position is not a string, then it will be automatically converted to the proper RDF datatype using RDF Literal.

This produces quads according to the RDFJS specification.

Usage

const quad = require('rdf-quad');

// Object is an IRI
quad('http://example.org/subject', 'http://example.org/predicate', 'http://example.org/object');

// Object is a variable
quad('http://example.org/subject', 'http://example.org/predicate', '?variable');

// Object is a string literal
quad('http://example.org/subject', 'http://example.org/predicate', '"myString"', 'http://example.org/someGraph');

// Object is an integer
quad('http://example.org/subject', 'http://example.org/predicate', 123);

// Object is a boolean
quad('http://example.org/subject', 'http://example.org/predicate', true);

// Subject is a nested quad
quad('<<ex:s ex:p ex:o>>', 'http://example.org/predicate', 'http://example.org/object');

License

This software is written by Ruben Taelman.

This code is released under the MIT license.

Keywords

FAQs

Package last updated on 31 Aug 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