@schema-render/search-table-react
Version:
Conditional search table component.
18 lines (17 loc) • 709 B
TypeScript
/**
* 数据是否为空,【null、undefined、空数组、空对象、空字符串】将被判断为空
*/
export declare const isEmpty: (data: any) => boolean;
/**
* 遍历数组,返回新数组
*/
export declare function map<U extends any>(arr: any, fn: (value: any, index: number, array: any[]) => U): U[];
/**
* 遍历数组,返回 true 跳出后续循环
*/
export declare function forEach<V extends any>(arrLike?: ArrayLike<V>, fn?: (value: V, index: number, array: ArrayLike<V>) => boolean | void): void;
/**
* 创建短字符唯一ID
* ref https://stackoverflow.com/questions/1349404/generate-random-string-characters-in-javascript
*/
export declare function createRandomId(): string;