core-utils
    Preparing search index...
    • 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

      Parameters

      • array: T[]

        The array to chunk.

      • size: number

        The length of each chunk.

      Returns T[][]

      the new 2D array of chunks.