@frank-auth/react
Version:
Flexible and customizable React UI components for Frank Authentication
33 lines • 2.19 kB
TypeScript
export * from './api';
export * from './auth';
export * from './validation';
export * from './storage';
export * from './crypto';
export * from './url';
export * from './format';
export * from './error';
export * from './theme';
export declare const sleep: (ms: number) => Promise<void>;
export declare const debounce: <T extends (...args: any[]) => any>(func: T, wait: number, immediate?: boolean) => ((...args: Parameters<T>) => void);
export declare const throttle: <T extends (...args: any[]) => any>(func: T, limit: number) => ((...args: Parameters<T>) => void);
export declare const omit: <T extends Record<string, any>, K extends keyof T>(obj: T, keys: K[]) => Omit<T, K>;
export declare const pick: <T extends Record<string, any>, K extends keyof T>(obj: T, keys: K[]) => Pick<T, K>;
export declare const isEmpty: (value: any) => boolean;
export declare const isEqual: (a: any, b: any) => boolean;
export declare const generateId: () => string;
export declare const clamp: (value: number, min: number, max: number) => number;
export declare const arrayToObject: <T>(array: T[], keyFn: (item: T) => string) => Record<string, T>;
export declare const groupBy: <T>(array: T[], keyFn: (item: T) => string) => Record<string, T[]>;
export declare const unique: <T>(array: T[]) => T[];
export declare const uniqueBy: <T>(array: T[], keyFn: (item: T) => any) => T[];
export declare const capitalize: (str: string) => string;
export declare const camelCase: (str: string) => string;
export declare const kebabCase: (str: string) => string;
export declare const snakeCase: (str: string) => string;
export declare const truncate: (str: string, length: number, suffix?: string) => string;
export declare const randomInt: (min: number, max: number) => number;
export declare const randomChoice: <T>(array: T[]) => T;
export declare const retry: <T>(fn: () => Promise<T>, maxAttempts?: number, delay?: number) => Promise<T>;
export declare const withTimeout: <T>(promise: Promise<T>, timeoutMs: number, errorMessage?: string) => Promise<T>;
export declare const memoize: <T extends (...args: any[]) => any>(fn: T, keyFn?: (...args: Parameters<T>) => string) => T;
//# sourceMappingURL=index.d.ts.map