Created
October 1, 2012 21:13
-
-
Save isaacs/3814458 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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