@flatten-js/interval-tree
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -406,3 +406,3 @@ 'use strict'; | ||
/** | ||
* @param {Interval} interval - optional if the iterator is intended to start from the beginning or end | ||
* @param {Interval} interval - optional if the iterator is intended to start from the beginning | ||
* @param outputMapperFn(value,key) - optional function that maps (value, key) to custom output | ||
@@ -661,4 +661,8 @@ * @returns {Iterator} | ||
if (curr.less_than(search_node)) { | ||
if (curr.intersect(search_node) && (!best || curr.less_than(best))) best = curr; | ||
curr = curr.right; | ||
if (curr.intersect(search_node)) { | ||
best = curr; | ||
curr = curr.left; | ||
} else { | ||
curr = curr.right; | ||
} | ||
} else { | ||
@@ -665,0 +669,0 @@ if (!best || curr.less_than(best)) best = curr; |
@@ -402,3 +402,3 @@ /** | ||
/** | ||
* @param {Interval} interval - optional if the iterator is intended to start from the beginning or end | ||
* @param {Interval} interval - optional if the iterator is intended to start from the beginning | ||
* @param outputMapperFn(value,key) - optional function that maps (value, key) to custom output | ||
@@ -657,4 +657,8 @@ * @returns {Iterator} | ||
if (curr.less_than(search_node)) { | ||
if (curr.intersect(search_node) && (!best || curr.less_than(best))) best = curr; | ||
curr = curr.right; | ||
if (curr.intersect(search_node)) { | ||
best = curr; | ||
curr = curr.left; | ||
} else { | ||
curr = curr.right; | ||
} | ||
} else { | ||
@@ -661,0 +665,0 @@ if (!best || curr.less_than(best)) best = curr; |
@@ -408,3 +408,3 @@ (function (global, factory) { | ||
/** | ||
* @param {Interval} interval - optional if the iterator is intended to start from the beginning or end | ||
* @param {Interval} interval - optional if the iterator is intended to start from the beginning | ||
* @param outputMapperFn(value,key) - optional function that maps (value, key) to custom output | ||
@@ -663,4 +663,8 @@ * @returns {Iterator} | ||
if (curr.less_than(search_node)) { | ||
if (curr.intersect(search_node) && (!best || curr.less_than(best))) best = curr; | ||
curr = curr.right; | ||
if (curr.intersect(search_node)) { | ||
best = curr; | ||
curr = curr.left; | ||
} else { | ||
curr = curr.right; | ||
} | ||
} else { | ||
@@ -667,0 +671,0 @@ if (!best || curr.less_than(best)) best = curr; |
{ | ||
"name": "@flatten-js/interval-tree", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Interval search tree", | ||
@@ -5,0 +5,0 @@ "author": "Alex Bol", |
@@ -425,4 +425,8 @@ /** | ||
if (curr.less_than(search_node)) { | ||
if (curr.intersect(search_node) && (!best || curr.less_than(best))) best = curr; | ||
curr = curr.right; | ||
if (curr.intersect(search_node)) { | ||
best = curr; | ||
curr = curr.left; | ||
} else { | ||
curr = curr.right; | ||
} | ||
} else { | ||
@@ -429,0 +433,0 @@ if (!best || curr.less_than(best)) best = curr; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
148083
3257