Skip to content

Welshman Docs / @welshman/lib / sortBy

Function: sortBy() ​

sortBy<T>(f, xs): T[]

Defined in: packages/lib/src/Tools.ts:798

Returns array sorted by key function

Type Parameters ​

• T

Parameters ​

f ​

(x) => any

Function to generate sort key

xs ​

T[]

Array to sort

Returns ​

T[]

Sorted array