Skip to main content

Function: chunk()

chunk<T>(array: readonly T[], chunkSize: number): T[][]

Splits up an array into chunks

Type Parameters

Type Parameter
T

Parameters

ParameterTypeDescription
arrayreadonly T[]The array to chunk up
chunkSizenumberThe size of each individual chunk

Returns

T[][]

Defined in

chunk.ts:6