UNPKG

2.48 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 toEnumerable<T = unknown>(val: any): T[];
12export declare function toArray(val: any): any[];
13export declare function toValue(value: any): any;
14export declare function isNumber(value: any): value is number;
15export declare function toLiquid(value: any): any;
16export declare function isNil(value: any): boolean;
17export declare function isUndefined(value: any): boolean;
18export declare function isArray(value: any): value is any[];
19export declare function isIterable(value: any): value is Iterable<any>;
20export declare function forOwn<T>(obj: Record<string, T> | undefined, iteratee: ((val: T, key: string, obj: {
21 [key: string]: T;
22}) => boolean | void)): Record<string, T>;
23export declare function last<T>(arr: T[]): T;
24export declare function last(arr: string): string;
25export declare function isObject(value: any): value is object;
26export declare function range(start: number, stop: number, step?: number): number[];
27export declare function padStart(str: any, length: number, ch?: string): any;
28export declare function padEnd(str: any, length: number, ch?: string): any;
29export declare function pad(str: any, length: number, ch: string, add: (str: string, ch: string) => string): any;
30export declare function identify<T>(val: T): T;
31export declare function changeCase(str: string): string;
32export declare function ellipsis(str: string, N: number): string;
33export declare function caseInsensitiveCompare(a: any, b: any): 0 | 1 | -1;
34export declare function argumentsToValue<F extends (...args: any) => any, T>(fn: F): (this: T, ...args: Parameters<F>) => any;
35export declare function escapeRegExp(text: string): string;