react-js-plugins
Version:
A powerful and efficient React utility library designed to enhance application performance by streamlining and simplifying the management of complex asynchronous operations.
11 lines (10 loc) • 770 B
TypeScript
export declare const _isNotEmpty: <T>(value: T) => boolean;
export declare const _UUID: () => string;
export declare const _countWords: (str: string) => number;
export declare const _isLeapYear: (year: number) => boolean;
export declare const _isWeekend: (date: Date) => boolean;
export declare const _removeFalsy: <T>(arr: T[]) => T[];
export declare const _escapeHTML: (str: string) => string;
export declare const _handleApi: <T>(apiCall: Promise<T>, onSuccess: (res: T) => void, onError: (err: unknown) => void, onFinally?: () => void) => Promise<void>;
export declare const _handleSafe: (action: () => void | Promise<void>, onError?: (error: unknown) => void, onFinally?: () => void) => Promise<void>;
export declare function _clearRouteState(path?: string): void;