bst-typed 1.52.5 → 1.52.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -276,7 +276,7 @@ class BinaryTree extends base_1.IterableEntryBase {
|
|
|
276
276
|
* @returns a boolean value.
|
|
277
277
|
*/
|
|
278
278
|
isRealNodeOrNull(node) {
|
|
279
|
-
return this.isRealNode(node)
|
|
279
|
+
return node === null || this.isRealNode(node);
|
|
280
280
|
}
|
|
281
281
|
/**
|
|
282
282
|
* The function checks if a given node is equal to the NIL value.
|
|
@@ -1526,7 +1526,7 @@ class BinaryTree extends base_1.IterableEntryBase {
|
|
|
1526
1526
|
if (includeNull)
|
|
1527
1527
|
return this.isRealNodeOrNull(node);
|
|
1528
1528
|
return this.isRealNode(node);
|
|
1529
|
-
}, shouldProcessRoot = node =>
|
|
1529
|
+
}, shouldProcessRoot = node => this.isRealNodeOrNull(node)) {
|
|
1530
1530
|
beginRoot = this.ensureNode(beginRoot);
|
|
1531
1531
|
if (!beginRoot)
|
|
1532
1532
|
return [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bst-typed",
|
|
3
|
-
"version": "1.52.
|
|
3
|
+
"version": "1.52.6",
|
|
4
4
|
"description": "BST (Binary Search Tree). Javascript & Typescript Data Structure.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -144,6 +144,6 @@
|
|
|
144
144
|
"typescript": "^4.9.5"
|
|
145
145
|
},
|
|
146
146
|
"dependencies": {
|
|
147
|
-
"data-structure-typed": "^1.52.
|
|
147
|
+
"data-structure-typed": "^1.52.6"
|
|
148
148
|
}
|
|
149
149
|
}
|
|
@@ -335,7 +335,7 @@ export class BinaryTree<
|
|
|
335
335
|
* @returns a boolean value.
|
|
336
336
|
*/
|
|
337
337
|
isRealNodeOrNull(node: R | BTNKeyOrNodeOrEntry<K, V, NODE>): node is NODE | null {
|
|
338
|
-
return this.isRealNode(node)
|
|
338
|
+
return node === null || this.isRealNode(node);
|
|
339
339
|
}
|
|
340
340
|
|
|
341
341
|
/**
|
|
@@ -1843,7 +1843,7 @@ export class BinaryTree<
|
|
|
1843
1843
|
if (includeNull) return this.isRealNodeOrNull(node);
|
|
1844
1844
|
return this.isRealNode(node);
|
|
1845
1845
|
},
|
|
1846
|
-
shouldProcessRoot: (node: OptBTNOrNull<NODE>) => boolean = node =>
|
|
1846
|
+
shouldProcessRoot: (node: OptBTNOrNull<NODE>) => boolean = node => this.isRealNodeOrNull(node)
|
|
1847
1847
|
): ReturnType<C>[] {
|
|
1848
1848
|
beginRoot = this.ensureNode(beginRoot);
|
|
1849
1849
|
if (!beginRoot) return [];
|