Preparing search index...
The search index is not available
@hat-open/util
@hat-open/util
_sort
Function _sort
_sort
<
T
>
(
fn
,
arr
)
:
T
[]
Sort array
Comparison function receives two arguments representing array elements and should return:
negative number in case first argument is more significant then second
zero in case first argument is equaly significant as second
positive number in case first argument is less significant then second
Type Parameters
T
Parameters
fn
:
(
(
x
,
y
)
=>
number
)
(
x
,
y
)
:
number
Parameters
x
:
T
y
:
T
Returns
number
arr
:
T
[]
Returns
T
[]
Settings
Member Visibility
Protected
Private
Inherited
External
Theme
OS
Light
Dark
@hat-open/util
Loading...
Sort array
Comparison function receives two arguments representing array elements and should return: