1.3.4 • Published 4 years ago

@sealsystems/countingstream v1.3.4

Weekly downloads
9
License
MIT
Repository
github
Last release
4 years ago

@sealsystems/countingstream

CircleCI AppVeyor

@sealsystems/countingstream counts the stream length in bytes.

Installation

$ npm install @sealsystems/countingstream

Quick start

First you need to add a reference to @sealsystems/countingstream within your application.

const CountingStream = require('@sealsystems/countingstream');

Then, call the constructor function.

const countingstream = new 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.getCount(); // -> returns the number of bytes streamed so far

You can reset the counter any time.

countingstream.resetCount();

It is also possible to set the counter to an arbitrary value.

countingstream.resetCount(42);
countingstream.getCount(); // -> returns 42

Running the build

To build this module use roboter.

$ bot
1.3.4

4 years ago

1.3.3

5 years ago

1.3.2

5 years ago

1.3.1

5 years ago

1.3.0

6 years ago

1.2.0

6 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.2

7 years ago