Hex Core JS
    Preparing search index...

    Function inGroupsOf

    • Splits the given array into sub-arrays each with the specified size (except possibly the last array, which may be shorter if the given array is not evenly divisible by the group size).

      Type Parameters

      • T

      Parameters

      • array: T[]

        The array to split.

      • groupSize: number

        The size of each resulting sub-array.

      Returns T[][]