UNPKG

svelte-ux

Version:

- Increment version in `package.json` and commit as `Version bump to x.y.z` - `npm run publish`

13 lines (12 loc) 707 B
import type { PropAccessorArg } from './object'; export declare function createCompoundSort(...sortFns: { (a: any, b: any): any; }[]): (a: any, b: any) => any; export declare function createSortFunc(valueFn: (a: any) => any, direction?: 'asc' | 'desc'): (a: any, b: any) => number; export declare function createPropertySortFunc(prop?: PropAccessorArg, direction?: 'asc' | 'desc'): (a: any, b: any) => number; export declare function nestedSort(data: Array<{ values?: object[]; }>, sortFunc: (a: object, b: object, depth: number) => number, depth?: number): { values?: object[]; }[]; export declare function sort<T = any>(arr: Array<T>, prop?: PropAccessorArg, direction?: 'asc' | 'desc'): T[];