seal-countingstream
seal-countingstream counts the stream length in bytes.
Installation
$ npm install seal-countingstream
Quick start
First you need to add a reference to seal-countingstream within your application.
const CountingStream = ;
Then, call the constructor function.
const countingstream = ;
CountingStream is derived from the Transform stream and can be used like any such stream. To get the number of bytes piped through, call:
const numberOfStreamedBytes = countingstream; // -> returns the number of bytes streamed so far
You can reset the counter any time.
countingstream;
It is also possible to set the counter to an arbitrary value.
countingstream;countingstream; // -> returns 42
Running the build
To build this module use roboter.
$ bot