readable.js 771 B

12345678910111213141516171819
  1. var Stream = require('stream');
  2. if (process.env.READABLE_STREAM === 'disable' && Stream) {
  3. module.exports = Stream;
  4. exports = module.exports = Stream.Readable;
  5. exports.Readable = Stream.Readable;
  6. exports.Writable = Stream.Writable;
  7. exports.Duplex = Stream.Duplex;
  8. exports.Transform = Stream.Transform;
  9. exports.PassThrough = Stream.PassThrough;
  10. exports.Stream = Stream;
  11. } else {
  12. exports = module.exports = require('./lib/_stream_readable.js');
  13. exports.Stream = Stream || exports;
  14. exports.Readable = exports;
  15. exports.Writable = require('./lib/_stream_writable.js');
  16. exports.Duplex = require('./lib/_stream_duplex.js');
  17. exports.Transform = require('./lib/_stream_transform.js');
  18. exports.PassThrough = require('./lib/_stream_passthrough.js');
  19. }