GT2/GT2-Android/node_modules/stream-counter/README.md

15 lines
309 B
Markdown
Raw Normal View History

# stream-counter
Keep track of how many bytes have been written to a stream.
## Usage
```js
var StreamCounter = require('stream-counter');
var counter = new StreamCounter();
counter.on('progress', function() {
console.log("progress", counter.bytes);
});
fs.createReadStream('foo.txt').pipe(counter);
```