Skip to content

binarySearch

binarySearch(items, target, getValue): number[]

binarySearch finds the index of a value in a sorted array.

Parameters

items: any[]

The sorted array

target: any

The value to find

getValue: Function= undefined

The function to get the value from the item

Returns

number[]

The index of the value

Source

ecmascript/src/utils.ts:154


Generated using typedoc-plugin-markdown and TypeDoc