UNPKG

rhodash

Version:

A deadly simple alternative to lodash

10 lines 374 B
/** * For a given sequence, divide it into chunks of a given size and group them into arrays. * * @param array array you want to make chunk * @param size chunk size * @returns chunked array * @example chunk([1, 2, 3, 4, 5], 3) // => [[1, 2, 3], [4, 5]] */ export declare function chunk<T>(array: readonly T[], size: number): T[][]; //# sourceMappingURL=chunk.d.ts.map