npm.io
1.0.0 • Published 12 years ago

stream-counter

Licence
MIT
Version
1.0.0
Deps
0
Vulns
0
Weekly
0
Stars
7

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);