Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

batch-stream

segmentio93.4kMIT0.1.3TypeScript support: definitely-typed

Transform a stream into batches

batch, stream, chunks, chunked

readme

Batch Stream

Transform stream which batches a bunch of input data into groups of specified size. Will emit arrays, so that you can deal with pieces of input asynchronously.

Usage


var batch = new BatchStream({ size : 5 });

stream
  .pipe(batch)
  .pipe(new ArrayStream()); // deals with array input from pipe.

changelog

0.1.3 / 2016-05-08

  • Allow instantiation without new
  • It should be possible to set highWaterMark to 0.