UNPKG
@onesy/algorithms
Version:
latest (1.0.0)
1.0.0
Algorithms
github.com/onesy-org/onesy-algorithms
onesy-org/onesy-algorithms
@onesy/algorithms
/
binarySearch.d.ts
7 lines
(6 loc)
•
244 B
TypeScript
View Raw
1
2
3
4
5
6
7
import
{
TMethod
}
from
'@onesy/models'
;
export
interface
IBinarySearchOptions
{
sort
?:
boolean
;
sortMethod
?:
TMethod
; }
export
default
function
binarySearch
(
array
:
Array
<
number
>,
value
:
number
,
options
?:
IBinarySearchOptions
):
number
;