UNPKG

367 BTypeScriptView Raw
1/**
2 * 将一个数组分割成大小的组。如果数组不能被平均分配,那么最后一块将是剩下的元素
3 * @param array 数组
4 * @param size 每组大小
5 */
6export declare function chunk<T>(array: T[], size: number): T[][];
7
8declare module './ctor' {
9 interface XEUtilsMethods {
10 chunk: typeof chunk;
11 }
12}
13
14export default chunk