UNPKG

fast-sort-lens

Version:
14 lines (13 loc) 478 B
import { sort } from "fast-sort"; //#region src/index.d.ts type OrderBy<T> = { prop: keyof T | ((it: T) => any); order: 'asc' | 'desc' | ((a: any, b: any) => number); }; /** * just like lodash.orderBy API spec */ declare function fastOrderBy<T>(list: T[], props: OrderBy<T>['prop'][], orders: OrderBy<T>['order'][]): T[]; declare function fastSortWithOrders<T>(list: T[], orders: OrderBy<T>[]): T[]; //#endregion export { OrderBy, fastOrderBy, fastSortWithOrders, sort };