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

    Type Parameters

    • T

    Parameters

    • array: undefined | null | List<T>

      The array to process.

    • Optionalsize: number

      The length of each chunk.

    Returns T[][]

    Returns the new array containing chunks.