Sha256: aafd4b914d571e9ccc63524d425fd9a53fd509751c876c13a1e873289a64d21b
Contents?: true
Size: 364 Bytes
Versions: 17
Compression:
Stored size: 364 Bytes
Contents
module.exports = ByteCounter; var Writable = require('readable-stream').Writable; var util = require('util'); util.inherits(ByteCounter, Writable); function ByteCounter(options) { Writable.call(this, options); this.bytes = 0; } ByteCounter.prototype._write = function(chunk, encoding, cb) { this.bytes += chunk.length; this.emit('progress'); cb(); };
Version data entries
17 entries across 17 versions & 2 rubygems