mirror of
https://github.com/pezkuwichain/pezkuwi-common.git
synced 2026-04-22 02:07:56 +00:00
16 lines
383 B
TypeScript
16 lines
383 B
TypeScript
/**
|
|
* @name arrayChunk
|
|
* @summary Split T[] into T[][] based on the defind size
|
|
* @description
|
|
* Returns a set ao arrays based on the chunksize
|
|
* @example
|
|
* <BR>
|
|
*
|
|
* ```javascript
|
|
* import { arrayChunk } from '@pezkuwi/util';
|
|
*
|
|
* arrayChunk([1, 2, 3, 4, 5]); // [[1, 2], [3, 4], [5]]
|
|
* ```
|
|
*/
|
|
export declare function arrayChunk<T>(array: T[], chunkSize: number): T[][];
|