Skip to content

Welshman Docs / @welshman/lib / chunks

Function: chunks() ​

chunks<T>(n, xs): T[][]

Defined in: packages/lib/src/Tools.ts:894

Splits array into specified number of chunks

Type Parameters ​

• T

Parameters ​

n ​

number

Number of chunks

xs ​

T[]

Array to split

Returns ​

T[][]

Array of n chunks