UNPKG

2.37 kBTypeScriptView Raw
1export declare const toString: () => string;
2export declare const hasOwnProperty: (v: PropertyKey) => boolean;
3export declare function isString(value: any): value is string;
4export declare function isFunction(value: any): value is Function;
5export declare function isPromise<T>(val: any): val is Promise<T>;
6export declare function isIterator(val: any): val is IterableIterator<any>;
7export declare function escapeRegex(str: string): string;
8export declare function promisify<T1, T2>(fn: (arg1: T1, cb: (err: Error | null, result: T2) => void) => void): (arg1: T1) => Promise<T2>;
9export 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>;
10export declare function stringify(value: any): string;
11export declare function toValue(value: any): any;
12export declare function isNumber(value: any): value is number;
13export declare function toLiquid(value: any): any;
14export declare function isNil(value: any): boolean;
15export declare function isArray(value: any): value is any[];
16export declare function isIterable(value: any): value is Iterable<any>;
17export declare function forOwn<T>(obj: {
18 [key: string]: T;
19} | undefined, iteratee: ((val: T, key: string, obj: {
20 [key: string]: T;
21}) => boolean | void)): {
22 [key: string]: T;
23};
24export declare function last<T>(arr: T[]): T;
25export declare function last(arr: string): string;
26export declare function isObject(value: any): value is object;
27export declare function range(start: number, stop: number, step?: number): number[];
28export declare function padStart(str: any, length: number, ch?: string): any;
29export declare function padEnd(str: any, length: number, ch?: string): any;
30export declare function pad(str: any, length: number, ch: string, add: (str: string, ch: string) => string): any;
31export declare function identify<T>(val: T): T;
32export declare function snakeCase(str: string): string;
33export declare function changeCase(str: string): string;
34export declare function ellipsis(str: string, N: number): string;
35export declare function caseInsensitiveCompare(a: any, b: any): 1 | 0 | -1;
36export declare function argumentsToValue<F extends (...args: any) => any>(fn: F): (...args: Parameters<F>) => any;
37export declare function escapeRegExp(text: string): string;