UNPKG

2.53 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 toNumber(value: any): number;
15export declare function isNumber(value: any): value is number;
16export declare function toLiquid(value: any): any;
17export declare function isNil(value: any): boolean;
18export declare function isUndefined(value: any): boolean;
19export declare function isArray(value: any): value is any[];
20export declare function isIterable(value: any): value is Iterable<any>;
21export declare function forOwn<T>(obj: Record<string, T> | undefined, iteratee: ((val: T, key: string, obj: {
22 [key: string]: T;
23}) => boolean | void)): Record<string, T>;
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 changeCase(str: string): string;
33export declare function ellipsis(str: string, N: number): string;
34export declare function caseInsensitiveCompare(a: any, b: any): 0 | 1 | -1;
35export declare function argumentsToValue<F extends (...args: any) => any, T>(fn: F): (this: T, ...args: Parameters<F>) => any;
36export declare function escapeRegExp(text: string): string;