@jiway/firestorm-core - v1.1.1
    Preparing search index...

    Function splitInBatches

    • Splits the array in smallers arrays of a specific maximum size.

      It is O(n) in complexity.

      Type Parameters

      • T

      Parameters

      • sourceArray: T[]

        Array to split

      • batchSize: number

        Maximum size of a batch

      Returns Generator<T[], void, unknown>