Repositorio del curso CCOM4030 el semestre B91 del proyecto Artesanías con el Instituto de Cultura

1234567891011121314151617181920212223242526272829
  1. 'use strict';
  2. const isStream = stream =>
  3. stream !== null &&
  4. typeof stream === 'object' &&
  5. typeof stream.pipe === 'function';
  6. isStream.writable = stream =>
  7. isStream(stream) &&
  8. stream.writable !== false &&
  9. typeof stream._write === 'function' &&
  10. typeof stream._writableState === 'object';
  11. isStream.readable = stream =>
  12. isStream(stream) &&
  13. stream.readable !== false &&
  14. typeof stream._read === 'function' &&
  15. typeof stream._readableState === 'object';
  16. isStream.duplex = stream =>
  17. isStream.writable(stream) &&
  18. isStream.readable(stream);
  19. isStream.transform = stream =>
  20. isStream.duplex(stream) &&
  21. typeof stream._transform === 'function' &&
  22. typeof stream._transformState === 'object';
  23. module.exports = isStream;