UNPKG

1.86 kBTypeScriptView Raw
1export declare function isString(value: any): value is string;
2export declare function isFunction(value: any): value is Function;
3export declare function escapeRegex(str: string): string;
4export declare function promisify<T1, T2>(fn: (arg1: T1, cb: (err: Error | null, result: T2) => void) => void): (arg1: T1) => Promise<T2>;
5export declare function promisify<T1, T2, T3>(fn: (arg1: T1, arg2: T2, cb: (err: Error | null, result: T3) => void) => void): (arg1: T1, arg2: T2) => Promise<T3>;
6export declare function stringify(value: any): string;
7export declare function toValue(value: any): any;
8export declare function isNumber(value: any): value is number;
9export declare function toLiquid(value: any): any;
10export declare function isNil(value: any): boolean;
11export declare function isArray(value: any): value is any[];
12export declare function forOwn<T>(obj: {
13 [key: string]: T;
14} | undefined, iteratee: ((val: T, key: string, obj: {
15 [key: string]: T;
16}) => boolean | void)): {
17 [key: string]: T;
18};
19export declare function last<T>(arr: T[]): T;
20export declare function last(arr: string): string;
21export declare function isObject(value: any): value is object;
22export declare function range(start: number, stop: number, step?: number): number[];
23export declare function padStart(str: any, length: number, ch?: string): any;
24export declare function padEnd(str: any, length: number, ch?: string): any;
25export declare function pad(str: any, length: number, ch: string, add: (str: string, ch: string) => string): any;
26export declare function identify<T>(val: T): T;
27export declare function snakeCase(str: string): string;
28export declare function changeCase(str: string): string;
29export declare function ellipsis(str: string, N: number): string;
30export declare function caseInsensitiveCompare(a: any, b: any): 1 | 0 | -1;