The array to iterate over.
Items per batch. 0 means "use the entire array as one batch".
Must be a non-negative safe integer.
Async callback invoked for each batch.
batch: A slice of arr (entire arr when batch_size === 0).index: Starting index of batch within arr (always 0 when batch_size === 0).Resolves when all batches have been processed.
Asynchronously iterate over an array in batches.
batch_size > 0, the array is split into consecutive batches of up tobatch_sizeelements and processed sequentially.batch_size === 0, the entire array is passed as a single batch (withindex = 0).