inspectStream.js 264 B

1234567891011
  1. var isStream = require('./isStream');
  2. module.exports = function(stream) {
  3. if (!isStream(stream)) return;
  4. var streamType = stream.constructor.name;
  5. // avoid StreamStream
  6. if (streamType === 'Stream') streamType = '';
  7. return '<'+streamType+'Stream>';
  8. };