UNPKG

3.13 kBTypeScriptView Raw
1export declare function noop(): void;
2export declare function toString(value: any): any;
3export declare function getType(value: any): string;
4export declare function isNull(value: any): value is null;
5export declare function isFunction(value: any): value is Function;
6export declare function isAsyncFunction(value: any): value is Function;
7export declare function isGeneratorFunction(value: any): value is GeneratorFunction;
8export declare function isString(value: any): value is string;
9export declare function isNumber(value: any): value is number;
10export declare function isBoolean(value: any): value is boolean;
11export declare function isElement(value: any): value is Element;
12export declare function isText(value: any): value is Text;
13export declare function isObject(value: any): value is object;
14export declare function isArray(value: any): value is any[];
15export declare function isTypedArray(value: any): boolean;
16export declare function isDate(value: any): value is Date;
17export declare function isRegExp(value: any): value is RegExp;
18export declare function toArray<T = any>(array: any): T[];
19export declare function toDate(value: any): Date;
20export declare function replace(str: string, from: string, to: string): string;
21export declare function formatDate(value: Date | number | string, format: string, options?: {
22 utc?: boolean;
23 translate?: Record<string, string>;
24}): string;
25export declare function each(list: any, handler: (key: string | number, value: any) => any, scope: any): any;
26export declare function copy(src: any, dst?: any, ignores?: string[]): any;
27export declare function clone(src: any, ignores?: string[]): any;
28export declare function getPrototypeOf(obj: any): any;
29export declare function setPrototypeOf(obj: any, proto: any): any;
30export declare function create(proto: any): any;
31export declare function mix(dst: any, src: any, ignores?: string[], mode?: 0 | 1 | 2 | 3 | 4, ignoreNull?: boolean): any;
32export declare function final(obj: any, name: string, value: any): void;
33export declare function deepEqual(a: any, b: any): boolean;
34export declare function fromTo(from: number, to: number, handler: (value?: number) => void, step?: number): void;
35export declare function newGuid(): string;
36export declare function setByPath(obj: any, path: string | string[], value: any): void;
37export declare function getByPath(obj: any, path: string | string[], filter?: (value?: any, key?: string, obj?: any) => boolean): any;
38export declare function getFunctionArgumentNames(fn: Function): string[];
39export declare const FUNC_REGEXP: RegExp;
40export declare function isFunctionString(str: string): boolean;
41export declare function toFunction(str: string): Function;
42export declare function short(str: string, maxLength: number): string;
43export declare function firstUpper(str: string): string;
44export declare function escapeRegExp(str: string): string;
45export declare function toCamelCase(str: string, mode: 1 | 0): string;
46export declare function toSplitCase(str: string): string;
47export declare function filterHTML(html: string): string;
48export declare function parseHTML(str: string): ChildNode[];