UNPKG

@litewit/helpers

Version:
8 lines (7 loc) 676 B
export declare const toSubstring: (str?: string | undefined, length?: number, endsWith?: string) => string | undefined; export declare const isPromise: (foo: any) => boolean; export declare const parseNum: (num: number | string | undefined | null) => number; export declare const equalNum: (num1: number | string | undefined | null, num2: number | string | undefined | null) => boolean; export declare function reduceUniqueIds<T>(ids: T[], id?: T): T[]; export declare const sortById: (id1?: number | undefined, id2?: number | undefined, desc?: boolean) => number; export declare const sortByDate: (d1?: string | undefined, d2?: string | undefined, desc?: boolean) => number;