🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

insection

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

insection - npm Package Compare versions

Comparing version

to
1.1.1

2

insection.js

@@ -75,3 +75,3 @@ /*!

if (!(this instanceof Insection)) {
return new Insection();
return new Insection(valueComparer);
}

@@ -78,0 +78,0 @@ valueComparer = valueComparer || defaultValueComparer;

@@ -54,3 +54,3 @@ var InvalidIntervalError = require('./InvalidIntervalError');

if (!(this instanceof Insection)) {
return new Insection();
return new Insection(valueComparer);
}

@@ -57,0 +57,0 @@ valueComparer = valueComparer || defaultValueComparer;

{
"name": "insection",
"version": "1.1.0",
"version": "1.1.1",
"description": "A data structure for storing number intervals",

@@ -5,0 +5,0 @@ "main": "lib/insection.js",

@@ -113,2 +113,14 @@ var Insection = require('../lib/Insection.js');

});
it("overrides duplicate entries", function () {
insection.add(3, 4, 'foo');
insection.add(3, 4, 'foo');
expect(insection.get(), 'to have length', 1);
});
it("does not consider duplicate intervals with distinct value duplicate", function () {
insection.add(3, 4, 'foo');
insection.add(3, 4, 'bar');
expect(insection.get(), 'to have length', 2);
});
});

@@ -115,0 +127,0 @@