MCPcopy Create free account
hub / github.com/nodejs/node / binarySearch

Function binarySearch

test/fixtures/snapshot/typescript.js:1364–1366  ·  view source on GitHub ↗

* Performs a binary search, finding the index at which `value` occurs in `array`. * If no such index is found, returns the 2's-complement of first index at which * `array[index]` exceeds `value`. * @param array A sorted array whose first element must be no larger than number * @p

(array, value, keySelector, keyComparer, offset)

Source from the content-addressed store, hash-verified

1362 * @param offset An offset into `array` at which to start the search.
1363 */
1364 function binarySearch(array, value, keySelector, keyComparer, offset) {
1365 return binarySearchKey(array, keySelector(value), keySelector, keyComparer, offset);
1366 }
1367 ts.binarySearch = binarySearch;
1368 /**
1369 * Performs a binary search, finding the index at which an object with `key` occurs in `array`.

Callers 1

insertSortedFunction · 0.85

Calls 1

binarySearchKeyFunction · 0.85

Tested by

no test coverage detected