all files / lib/ _stream_passthrough.js

90.91% Statements 10/11
50% Branches 1/2
100% Functions 2/2
100% Lines 10/10
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26            49×   49×     49× 49×     49×   49×       49× 59×  
// a passthrough stream.
// basically just the most minimal sort of Transform stream.
// Every written chunk gets output as-is.
 
'use strict';
 
module.exports = PassThrough;
 
var Transform = require('./_stream_transform');
 
/*<replacement>*/
var util = require('core-util-is');
util.inherits = require('inherits');
/*</replacement>*/
 
util.inherits(PassThrough, Transform);
 
function PassThrough(options) {
  Iif (!(this instanceof PassThrough)) return new PassThrough(options);
 
  Transform.call(this, options);
}
 
PassThrough.prototype._transform = function (chunk, encoding, cb) {
  cb(null, chunk);
};