node/deps/npm/node_modules/readable-stream/lib/_stream_passthrough.js
Forrest L Norvell 0928584444 deps: upgrade npm to 3.8.3
PR-URL: https://github.com/npm/node/pull/6
Reviewed-By: Evan Lucas <evanlucas@me.com>
2016-04-01 14:47:39 -07:00

26 lines
604 B
JavaScript

// 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) {
if (!(this instanceof PassThrough)) return new PassThrough(options);
Transform.call(this, options);
}
PassThrough.prototype._transform = function (chunk, encoding, cb) {
cb(null, chunk);
};