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

Version Path
hooch-0.4.2 jasmine/node_modules/karma/node_modules/connect/node_modules/multiparty/node_modules/stream-counter/index.js
hooch-0.4.1 jasmine/node_modules/karma/node_modules/connect/node_modules/multiparty/node_modules/stream-counter/index.js
hooch-0.4.0 jasmine/node_modules/karma/node_modules/connect/node_modules/multiparty/node_modules/stream-counter/index.js
hooch-0.3.0 jasmine/node_modules/karma/node_modules/connect/node_modules/multiparty/node_modules/stream-counter/index.js
hooch-0.2.1 jasmine/node_modules/karma/node_modules/connect/node_modules/multiparty/node_modules/stream-counter/index.js
hooch-0.2.0 jasmine/node_modules/karma/node_modules/connect/node_modules/multiparty/node_modules/stream-counter/index.js
hooch-0.1.0 jasmine/node_modules/karma/node_modules/connect/node_modules/multiparty/node_modules/stream-counter/index.js
hooch-0.0.8 jasmine/node_modules/karma/node_modules/connect/node_modules/multiparty/node_modules/stream-counter/index.js
hooch-0.0.7 jasmine/node_modules/karma/node_modules/connect/node_modules/multiparty/node_modules/stream-counter/index.js
hooch-0.0.6 jasmine/node_modules/karma/node_modules/connect/node_modules/multiparty/node_modules/stream-counter/index.js
entangled-0.0.16 spec/dummy/public/node_modules/karma/node_modules/connect/node_modules/multiparty/node_modules/stream-counter/index.js
entangled-0.0.15 spec/dummy/public/node_modules/karma/node_modules/connect/node_modules/multiparty/node_modules/stream-counter/index.js
entangled-0.0.14 spec/dummy/public/node_modules/karma/node_modules/connect/node_modules/multiparty/node_modules/stream-counter/index.js
entangled-0.0.13 spec/dummy/public/node_modules/karma/node_modules/connect/node_modules/multiparty/node_modules/stream-counter/index.js
entangled-0.0.12 spec/dummy/public/node_modules/karma/node_modules/connect/node_modules/multiparty/node_modules/stream-counter/index.js
entangled-0.0.11 spec/dummy/public/node_modules/karma/node_modules/connect/node_modules/multiparty/node_modules/stream-counter/index.js
entangled-0.0.10 spec/dummy/public/node_modules/karma/node_modules/connect/node_modules/multiparty/node_modules/stream-counter/index.js