Takaro - v0.4.11
    Preparing search index...

    Function chunk

    • 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: List<T> | null | undefined

        The array to process.

      • Optionalsize: number

        The length of each chunk.

      Returns T[][]

      Returns the new array containing chunks.