LogoRobo.js
Framework

sortRecords()

Function: sortRecords()

function sortRecords<T>(records, orderBy?): T[]

Sort records by orderBy clause.

Type Parameters

Type Parameter
T extends { id: string; }

Parameters

ParameterTypeDescription
recordsT[]Records to sort
orderBy?| Partial<Record<keyof T, OrderDirection>> | Partial<Record<keyof T, OrderDirection>>[]Order by clause (single or array)

Returns

T[]

Sorted records (new array)

On this page