@trail-ui/shared-utils
Version:
A set of TrailUI utilities
13 lines (11 loc) • 683 B
TypeScript
type Dict<T = any> = Record<string, T>;
declare function isArray<T>(value: any): value is Array<T>;
declare function isEmptyArray(value: any): boolean;
declare function isObject(value: any): value is Dict;
declare function isEmptyObject(value: any): boolean;
declare function isEmpty(value: any): boolean;
declare function isFunction<T extends (...args: any[]) => any>(value: any): value is T;
declare const isNumeric: (value?: string | number) => boolean;
type Booleanish = boolean | 'true' | 'false';
declare const dataAttr: (condition: boolean | undefined) => Booleanish;
export { Dict, dataAttr, isArray, isEmpty, isEmptyArray, isEmptyObject, isFunction, isNumeric, isObject };