array-binarysearch.closest
Advanced tools
Comparing version 0.2.1 to 0.2.2
{ | ||
"name": "array-binarysearch.closest", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "Get index of closest value in sorted array.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -11,8 +11,9 @@ # array-binarysearch.closest | ||
// binarySearch(<array>, <value>, [compare function], [this], [begin=0], [end]) | ||
// -> <index of closest value> | ||
binarySearch([21, 42, 91, 91], 40); | ||
// 1 | ||
binarySearch([21, 42, 91, 91], 42, 2); | ||
binarySearch([21, 42, 91, 91], 42, null, null, 2); | ||
// 2 | ||
binarySearch([21, 42, 91, 91], 92, 2, 4); | ||
binarySearch([21, 42, 91, 91], 92, null, null, 2, 4); | ||
// 4 | ||
@@ -19,0 +20,0 @@ |
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
2061
32