kit
    Preparing search index...
    • Split an array in the given number of chunks, when balanced the chunks sizes differ at most by one, otherwise all the chunks have the same size but the last one, which gets the remaining items. With less items than chunks each item gets its own chunk.

      Type Parameters

      • T

      Parameters

      • arr: T[]
      • nrOfChunks: number
      • Optionalbalanced: boolean

      Returns T[][]