UNPKG

rehance-forms

Version:
23 lines (22 loc) 829 B
/** * Returns true if the given value is a function. */ export declare function isFunc(val: any): boolean; /** * Returns true if the given value is a function. */ export declare function isPromise(val: any): boolean; /** * Capitalize the first letter of the given string and return it. */ export declare function capitalize(str: string): string; /** * Generate and return a random value between the 2 numbers. */ export declare function randomRange(min: number, max: number): number; /** * Wraps the given handler function with a memoization/cache layer that enables a function * to only be bound once for the given key. */ export declare function memoize<T extends (...args: any[]) => any>(func: T): (key: string, ...args: Parameters<T>) => () => void; export declare function equal(a: unknown, b: unknown): boolean;