Function chunk

  • Split an {@param array} into {@param chunkSize} sized chunks

    Type Parameters

    • T

    Parameters

    • array: T[]

      Array to split

    • chunkSize: number

      Size of chunk

    Returns T[][]

    Split array