"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/node_modules/npm/node_modules/readable-stream/lib/_stream_passthrough.js" (7 Feb 2017, 604 Bytes) of archive /windows/misc/atom-windows.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Javascript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    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 
   11 /*<replacement>*/
   12 var util = require('core-util-is');
   13 util.inherits = require('inherits');
   14 /*</replacement>*/
   15 
   16 util.inherits(PassThrough, Transform);
   17 
   18 function PassThrough(options) {
   19   if (!(this instanceof PassThrough)) return new PassThrough(options);
   20 
   21   Transform.call(this, options);
   22 }
   23 
   24 PassThrough.prototype._transform = function (chunk, encoding, cb) {
   25   cb(null, chunk);
   26 };