NoopStream.js 333 B

1234567891011121314
  1. const Stream = require('stream');
  2. const util = require('util');
  3. function NoopStream() {
  4. if (!(this instanceof NoopStream)) {
  5. return new NoopStream();
  6. }
  7. Stream.Transform.call(this);
  8. }
  9. util.inherits(NoopStream, Stream.Transform);
  10. NoopStream.prototype._transform = function(d, e, cb) { cb() ;};
  11. module.exports = NoopStream;