UNPKG

xverse-components-utils

Version:

xverse components utils

15 lines (14 loc) 360 B
/** * 将一个 Item 包装成数组 * @param param * @returns */ export declare const wrapToArray: <T>(param: T | T[]) => T[]; /** * 从数组中找出一个随机值 * @param arr * @returns */ export declare const getRandomItem: <T>(arr: T[]) => T | undefined; /** 将数组打散返回 */ export declare const shuffleArray: (array: any[]) => any[];