is-stream.js 194 B

123456789101112131415
  1. 'use strict';
  2. function isStream(stream) {
  3. if (!stream) {
  4. return false;
  5. }
  6. if (typeof stream.pipe !== 'function') {
  7. return false;
  8. }
  9. return true;
  10. }
  11. module.exports = isStream;