Batch chunks into arrays of specified size
The size of each batch
A TransformStream that groups chunks into batches
const stream = readable.pipeThrough(batch(3));// If readable emits [1, 2, 3, 4, 5], the result will be [[1, 2, 3], [4, 5]] Copy
const stream = readable.pipeThrough(batch(3));// If readable emits [1, 2, 3, 4, 5], the result will be [[1, 2, 3], [4, 5]]
Batch chunks into arrays of specified size