- Preparing search index...
- The search index is not available
Tuff
- sortByFunction<T>(array: T[], getKey: ((e: T) => string | number), dir?: SortDir): T[]
-
Type Parameters
-
T extends Record<string | symbol, any>
Parameters
-
array: T[]
-
getKey: ((e: T) => string | number)
-
- (e: T): string | number
-
Returns string | number
-
Returns T[]
Sorts an array of objects by a function.
Returns
(a new) sorted array