Remove excessive copyright/license boilerplate
[platform/upstream/nodejs.git] / lib / _stream_passthrough.js
1 // a passthrough stream.
2 // basically just the most minimal sort of Transform stream.
3 // Every written chunk gets output as-is.
4
5 'use strict';
6
7 module.exports = PassThrough;
8
9 var Transform = require('_stream_transform');
10 var util = require('util');
11 util.inherits(PassThrough, Transform);
12
13 function PassThrough(options) {
14   if (!(this instanceof PassThrough))
15     return new PassThrough(options);
16
17   Transform.call(this, options);
18 }
19
20 PassThrough.prototype._transform = function(chunk, encoding, cb) {
21   cb(null, chunk);
22 };