Welshman Docs / @welshman/lib / chunk
Function: chunk() ​
chunk<
T>(chunkLength,xs):T[][]
Defined in: packages/lib/src/Tools.ts:696
Splits array into chunks of specified length
Type Parameters ​
T ​
T
Parameters ​
chunkLength ​
number
Maximum length of each chunk
xs ​
T[]
Array to split
Returns ​
T[][]
Array of chunks