Skip to content

xdash API Reference v0.5.14


xdash API Reference / chunk

Function: chunk()

chunk<T>(arr, size): T[][]

Defined in: src/array.ts:83

Creates an array of elements split into groups the length of size. If array can't be split evenly, the final chunk will be the remaining elements.

Type Parameters

T

T

Parameters

arr

T[]

size

number

Returns

T[][]

Released under the MIT License.