sortByIndex
Public function
Sort by index.
Signature
function sortByIndex<
T extends {
index: string
},
>(a: T, b: T): -1 | 0 | 1
Parameters
Name | Description |
---|---|
|
An object with an index property. |
|
An object with an index property. |
Returns
-1 | 0 | 1
Source