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

jstreemap

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jstreemap - npm Package Compare versions

Comparing version 1.9.1 to 1.10.1

LICENSE.md

20

docs/coverage.json
{
"coverage": "100%",
"expectCount": 259,
"actualCount": 259,
"expectCount": 263,
"actualCount": 263,
"files": {

@@ -37,7 +37,12 @@ "src/internal/policies.js": {

"src/public/tree-map.js": {
"expectCount": 31,
"actualCount": 31,
"expectCount": 32,
"actualCount": 32,
"undocumentLines": []
},
"src/public/tree-multimap.js": {
"expectCount": 33,
"actualCount": 33,
"undocumentLines": []
},
"src/public/tree-multiset.js": {
"expectCount": 32,

@@ -47,13 +52,8 @@ "actualCount": 32,

},
"src/public/tree-multiset.js": {
"src/public/tree-set.js": {
"expectCount": 31,
"actualCount": 31,
"undocumentLines": []
},
"src/public/tree-set.js": {
"expectCount": 30,
"actualCount": 30,
"undocumentLines": []
}
}
}

@@ -567,2 +567,8 @@ window.esdocSearchIndex = [

[
"src/public/tree-map.js~treemap#erase",
"class/src/public/tree-map.js~TreeMap.html#instance-method-erase",
"src/public/tree-map.js~TreeMap#erase",
"method"
],
[
"src/public/tree-map.js~treemap#find",

@@ -730,2 +736,8 @@ "class/src/public/tree-map.js~TreeMap.html#instance-method-find",

[
"src/public/tree-multimap.js~treemultimap#erase",
"class/src/public/tree-multimap.js~TreeMultiMap.html#instance-method-erase",
"src/public/tree-multimap.js~TreeMultiMap#erase",
"method"
],
[
"src/public/tree-multimap.js~treemultimap#find",

@@ -905,2 +917,8 @@ "class/src/public/tree-multimap.js~TreeMultiMap.html#instance-method-find",

[
"src/public/tree-multiset.js~treemultiset#erase",
"class/src/public/tree-multiset.js~TreeMultiSet.html#instance-method-erase",
"src/public/tree-multiset.js~TreeMultiSet#erase",
"method"
],
[
"src/public/tree-multiset.js~treemultiset#find",

@@ -1068,2 +1086,8 @@ "class/src/public/tree-multiset.js~TreeMultiSet.html#instance-method-find",

[
"src/public/tree-set.js~treeset#erase",
"class/src/public/tree-set.js~TreeSet.html#instance-method-erase",
"src/public/tree-set.js~TreeSet#erase",
"method"
],
[
"src/public/tree-set.js~treeset#find",

@@ -1070,0 +1094,0 @@ "class/src/public/tree-set.js~TreeSet.html#instance-method-find",

{
"name": "jstreemap",
"version": "1.9.1",
"version": "1.10.1",
"description": "Library of associative containers.",

@@ -20,3 +20,3 @@ "main": "jstreemap.js",

"type": "git",
"url": "git+https://github.com/kirusi/setmap.git"
"url": "git+https://github.com/kirusi/jstreemap.git"
},

@@ -53,5 +53,5 @@ "keywords": [

"bugs": {
"url": "https://github.com/kirusi/setmap/issues"
"url": "https://github.com/kirusi/jstreemap/issues"
},
"homepage": "https://github.com/kirusi/setmap#readme",
"homepage": "https://github.com/kirusi/jstreemap#readme",
"dependencies": {

@@ -58,0 +58,0 @@ "app-module-path": "^2.2.0",

@@ -53,3 +53,3 @@ # jstreemap

Unlike standard sets and maps in ES6, this library provides ordered containers. Iteration through container contents will be done in sorted order without any additional performance load.
Unlike standard sets and maps in ES6, this library provides ordered containers. Iteration through container contents will be done in sorted order without any additional performance overhead.

@@ -56,0 +56,0 @@ [Container API](https://kirusi.github.io/jstreemap) implements features of default ES6 maps and sets as well as parts of STL (C++ library) interface.

@@ -8,4 +8,4 @@ /**

* Default constructor
* @param {Boolean} wasAdded
* @param {Boolean} wasReplaced
* @param {Boolean} wasAdded
* @param {Boolean} wasReplaced
* @param {Iterator} iterator only provided if the node was added, or replaced

@@ -12,0 +12,0 @@ */

@@ -378,2 +378,16 @@ /** An implementation of red-black tree */

/**
* Removes key-value pair for the specified iterator.
* @param {Iterator} iterator
* @example
* let map = new TreeMap([[1, 'A'], [2, 'B'], [3, 'C']]);
* let it = map.find(2);
* it.prev();
* map.erase(it); // removes a node with key 1
* console.log(map.toString()); // {2:B,3:C}
*/
erase(iterator) {
this.__t.erase(iterator.node);
}
/**
* Iterator pointing to the first element that is not less than specified key. If no such element is found, see end() iterator is returned.

@@ -380,0 +394,0 @@ * @param {*} key

@@ -416,2 +416,16 @@ /** An implementation of red-black tree */

/**
* Removes key-value pair for the specified iterator.
* @param {Iterator} iterator
* @example
* let map = new TreeMultiMap([[1, 'A'], [2, 'B'], [3, 'C']]);
* let it = map.find(2);
* it.prev();
* map.erase(it); // removes a node with key 1
* console.log(map.toString()); // {2:B,3:C}
*/
erase(iterator) {
this.__t.erase(iterator.node);
}
/**
* Iterator pointing to the first element that is not less than specified key. If no such element is found, see end() iterator is returned.

@@ -418,0 +432,0 @@ * @param {*} key

@@ -374,2 +374,16 @@ /** An implementation of red-black tree */

/**
* Removes value for the specified iterator.
* @param {Iterator} iterator
* @example
* let set = new TreeMultiSet([1,2,3]);
* let it = set.find(2);
* it.prev();
* set.erase(it); // removes a node with key 1
* console.log(set.toString()); // {2,3}
*/
erase(iterator) {
this.__t.erase(iterator.node);
}
/**
* Iterator pointing to the first element that is not less than specified key. If no such element is found, see end() iterator is returned.

@@ -376,0 +390,0 @@ * @param {*} key

@@ -355,2 +355,16 @@ /** An implementation of red-black tree */

/**
* Removes value for the specified iterator.
* @param {Iterator} iterator
* @example
* let set = new TreeSet([1,2,3]);
* let it = set.find(2);
* it.prev();
* set.erase(it); // removes a node with key 1
* console.log(set.toString()); // {2,3}
*/
erase(iterator) {
this.__t.erase(iterator.node);
}
/**
* Iterator pointing to the first element that is not less than specified key. If no such element is found, see end() iterator is returned.

@@ -357,0 +371,0 @@ * @param {*} key

@@ -363,2 +363,15 @@ 'use strict';

it('erase', function(done) {
let map = new TreeMap([[1, 'A'], [2, 'B'], [3, 'C']]);
let it = map.find(2);
it.prev();
map.erase(it);
let expected = '{2:B,3:C}';
should.equal(expected, map.toString());
map.delete(4);
should.equal(expected, map.toString());
done();
});
});

@@ -382,2 +382,15 @@ 'use strict';

it('erase', function(done) {
let map = new TreeMultiMap([[1, 'A'], [2, 'B'], [3, 'C']]);
let it = map.find(2);
it.prev();
map.erase(it);
let expected = '{2:B,3:C}';
should.equal(expected, map.toString());
map.delete(4);
should.equal(expected, map.toString());
done();
});
});

@@ -361,2 +361,15 @@ 'use strict';

it('erase', function(done) {
let map = new TreeMultiSet([1, 2, 3]);
let it = map.find(2);
it.prev();
map.erase(it);
let expected = '{2,3}';
should.equal(expected, map.toString());
map.delete(4);
should.equal(expected, map.toString());
done();
});
});

@@ -346,2 +346,15 @@ 'use strict';

it('erase', function(done) {
let map = new TreeSet([1, 2, 3]);
let it = map.find(2);
it.prev();
map.erase(it);
let expected = '{2,3}';
should.equal(expected, map.toString());
map.delete(4);
should.equal(expected, map.toString());
done();
});
});

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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