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

n3

Package Overview
Dependencies
Maintainers
1
Versions
127
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.4.4 to 0.4.5

10

lib/N3Store.js

@@ -336,9 +336,10 @@ // **N3Store** objects store N3 triples by graph in memory.

createBlankNode: function (suggestedName) {
var name;
var name, index;
// Generate a name based on the suggested name
if (suggestedName) {
name = suggestedName = '_:' + suggestedName;
var index = 1;
name = suggestedName = '_:' + suggestedName, index = 1;
while (this._entities[name])
name = suggestedName + index++;
}
// Generate a generic blank node name
else {

@@ -348,3 +349,4 @@ do { name = '_:b' + this._blankNodeIndex++; }

}
this._entities[name] = this._entityCount++;
// Add the blank node to the entities, avoiding the generation of duplicates
this._entities[name] = ++this._entityCount;
return name;

@@ -351,0 +353,0 @@ },

2

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

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

@@ -33,3 +33,3 @@ var N3Store = require('../N3').Store;

it('should be able to create unnamed blank nodes', function () {
it('should be able to generate unnamed blank nodes', function () {
store.createBlankNode().should.eql('_:b0');

@@ -42,3 +42,3 @@ store.createBlankNode().should.eql('_:b1');

it('should be able to create named blank nodes', function () {
it('should be able to generate named blank nodes', function () {
store.createBlankNode('blank').should.eql('_:blank');

@@ -48,2 +48,7 @@ store.createBlankNode('blank').should.eql('_:blank1');

});
it('should be able to store triples with generated blank nodes', function () {
store.addTriple(store.createBlankNode('x'), 'b', 'c');
shouldIncludeAll(store.find(null, 'b'), ['_:x1', 'b', 'd']);
});
});

@@ -50,0 +55,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