Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
'use strict';
// a passthrough stream.
// basically just the most minimal sort of Transform stream.
// Every written chunk gets output as-is.
module.exports = PassThrough;
var Transform = require('./transform.js');
var util = require('util');
util.inherits(PassThrough, Transform);
function PassThrough(options) {
Transform.call(this, options);
}
PassThrough.prototype._transform = function(chunk, output, cb) {
output(chunk);
cb();
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.