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

n3

Package Overview
Dependencies
Maintainers
1
Versions
125
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

n3 - npm Package Compare versions

Comparing version 0.2.2 to 0.2.3

5

lib/N3Util.js
// **N3Util** provides N3 utility functions
var XsdString = 'http://www.w3.org/2001/XMLSchema#string';
var RdfLangString = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#langString';

@@ -34,6 +35,6 @@ var N3Util = {

getLiteralType: function (literal) {
var match = /^"(?:.|\n|\r)*"(?:@[\-a-z]+|\^\^<(.+)>)?$/i.exec(literal);
var match = /^"(?:.|\n|\r)*"(?:\^\^<(.+)>|(@)[\-a-z]+)?$/i.exec(literal);
if (!match)
throw new Error(literal + ' is not a literal');
return match[1] || XsdString;
return match[1] || (match[2] ? RdfLangString : XsdString);
},

@@ -40,0 +41,0 @@

2

package.json
{
"name": "n3",
"version": "0.2.2",
"version": "0.2.3",
"description": "Lightning fast, asynchronous, streaming Turtle / N3 / RDF library.",

@@ -5,0 +5,0 @@ "author": "Ruben Verborgh <ruben.verborgh@gmail.com>",

@@ -154,3 +154,3 @@ var N3Util = require('../N3').Util;

it('gets the type of a literal with a language', function () {
N3Util.getLiteralType('"English"@en').should.equal('http://www.w3.org/2001/XMLSchema#string');
N3Util.getLiteralType('"English"@en').should.equal('http://www.w3.org/1999/02/22-rdf-syntax-ns#langString');
});

@@ -157,0 +157,0 @@

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