node-stream-counter

node.js module to keep track of how many bytes have been written to a stream

MIT License

Stars
7
Committers
2

stream-counter

Keep track of how many bytes have been written to a stream.

Usage

var StreamCounter = require('stream-counter');
var counter = new StreamCounter();
counter.on('progress', function() {
  console.log("progress", counter.bytes);
});
fs.createReadStream('foo.txt').pipe(counter);