binary-search-tree
Advanced tools
+1
-1
@@ -352,3 +352,3 @@ /** | ||
| // Delete only a value (no tree modification) | ||
| if (currentNode.data.length > 1 && value) { | ||
| if (currentNode.data.length > 1 && value !== undefined) { | ||
| currentNode.data.forEach(function (d) { | ||
@@ -355,0 +355,0 @@ if (!currentNode.checkValueEquality(d, value)) { newData.push(d); } |
+1
-1
| { | ||
| "name": "binary-search-tree", | ||
| "version": "0.2.5", | ||
| "version": "0.2.6", | ||
| "author": { | ||
@@ -5,0 +5,0 @@ "name": "Louis Chatriot", |
+2
-0
@@ -18,2 +18,4 @@ # Binary search trees for Node.js | ||
| Values inserted can be anything except `undefined`. | ||
| ```javascript | ||
@@ -20,0 +22,0 @@ var BinarySearchTree = require('binary-search-tree').BinarySearchTree |
+17
-0
@@ -825,2 +825,19 @@ var should = require('chai').should() | ||
| it("Removing falsy values does not delete the entire key", function () { | ||
| var avlt = new AVLTree(); | ||
| avlt.insert(10, 2); | ||
| avlt.insert(10, 1); | ||
| assert.deepEqual(avlt.search(10), [2, 1]); | ||
| avlt.delete(10, 2); | ||
| assert.deepEqual(avlt.search(10), [1]); | ||
| avlt.insert(10, 0); | ||
| assert.deepEqual(avlt.search(10), [1, 0]); | ||
| avlt.delete(10, 0); | ||
| assert.deepEqual(avlt.search(10), [1]); | ||
| }); | ||
| }); // ==== End of 'Deletion' ==== // | ||
@@ -827,0 +844,0 @@ |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
101330
0.5%2552
0.47%126
1.61%