sort-es
Version:
Blazing fast, tree-shakeable, type-safe, modern utility library to sort any type of array in less than 1 KB!
22 lines (21 loc) • 1.36 kB
TypeScript
import byAny from "./sortables/byAny";
import byDate from "./sortables/byDate";
import byValue from "./sortables/byValue";
import byValues from "./sortables/byValues";
import byString from "./sortables/byString";
import byNumber from "./sortables/byNumber";
import byBoolean from "./sortables/byBoolean";
import sortAsync, { AsyncArray } from "./sortables/byAsyncValue";
declare const _default: {
byAny: <T extends string | number | Date>(options?: import("./interfaces/interfaces").SortOption) => import("./types/types").sortable<T>;
byDate: import("./types/types").sortableWithOption<import("./types/types").datable, import("./interfaces/interfaces").SortByDateOption>;
byValue: typeof byValue;
byValues: typeof byValues;
byString: import("./types/types").sortableWithOption<string, import("./interfaces/interfaces").SortByStringOption>;
byNumber: import("./types/types").sortableWithOption<number, import("./interfaces/interfaces").SortOption>;
sortAsync: <T>(asyncItems: Promise<T>[], sortFn: import("./types/types").sortable<T>) => Promise<T[]>;
byBoolean: import("./types/types").sortableWithOption<boolean, import("./interfaces/interfaces").SortOption>;
AsyncArray: typeof AsyncArray;
};
export default _default;
export { byAny, byDate, byValue, byValues, byString, byNumber, sortAsync, byBoolean, AsyncArray, };