Sha256: c0c3871cd08bc9ea569d1e7ed485201b348f21ee29007eef81f6666b95f22987

Contents?: true

Size: 588 Bytes

Versions: 193

Compression:

Stored size: 588 Bytes

Contents

var stream = require('stream')


function isStream (obj) {
  return obj instanceof stream.Stream
}


function isReadable (obj) {
  return isStream(obj) && typeof obj._read == 'function' && typeof obj._readableState == 'object'
}


function isWritable (obj) {
  return isStream(obj) && typeof obj._write == 'function' && typeof obj._writableState == 'object'
}


function isDuplex (obj) {
  return isReadable(obj) && isWritable(obj)
}


module.exports            = isStream
module.exports.isReadable = isReadable
module.exports.isWritable = isWritable
module.exports.isDuplex   = isDuplex

Version data entries

193 entries across 187 versions & 27 rubygems

Version Path
trusty-festivity-extension-2.3.25 node_modules/bower/node_modules/request/node_modules/isstream/isstream.js
trusty-festivity-extension-2.3.24 node_modules/bower/node_modules/request/node_modules/isstream/isstream.js
trusty-festivity-extension-2.3.23 node_modules/bower/node_modules/request/node_modules/isstream/isstream.js
passenger-5.0.22 src/nodejs_supportlib/vendor-copy/winston/node_modules/isstream/isstream.js
es6_tilt-0.1.2 test/dummy/app/assets/javascripts/node_modules/fsevents/node_modules/node-pre-gyp/node_modules/request/node_modules/isstream/isstream.js
es6_tilt-0.1.1 test/dummy/app/assets/javascripts/node_modules/fsevents/node_modules/node-pre-gyp/node_modules/request/node_modules/isstream/isstream.js
es6_tilt-0.1.0 test/dummy/app/assets/javascripts/node_modules/fsevents/node_modules/node-pre-gyp/node_modules/request/node_modules/isstream/isstream.js
trusty-festivity-extension-2.3.22 node_modules/bower/node_modules/request/node_modules/isstream/isstream.js
trusty-festivity-extension-2.3.21 node_modules/bower/node_modules/request/node_modules/isstream/isstream.js
trusty-festivity-extension-2.3.20 node_modules/bower/node_modules/request/node_modules/isstream/isstream.js
trusty-festivity-extension-2.3.19 node_modules/bower/node_modules/request/node_modules/isstream/isstream.js
trusty-festivity-extension-2.3.18 node_modules/bower/node_modules/request/node_modules/isstream/isstream.js
trusty-festivity-extension-2.3.17 node_modules/bower/node_modules/request/node_modules/isstream/isstream.js
trusty-festivity-extension-2.3.16 node_modules/bower/node_modules/request/node_modules/isstream/isstream.js
trusty-festivity-extension-2.3.15 node_modules/bower/node_modules/request/node_modules/isstream/isstream.js
trusty-festivity-extension-2.3.14 node_modules/bower/node_modules/request/node_modules/isstream/isstream.js
trusty-festivity-extension-2.3.13 node_modules/bower/node_modules/request/node_modules/isstream/isstream.js
trusty-festivity-extension-2.3.12 node_modules/bower/node_modules/request/node_modules/isstream/isstream.js
trusty-festivity-extension-2.3.11g node_modules/bower/node_modules/request/node_modules/isstream/isstream.js
trusty-festivity-extension-2.3.10 node_modules/bower/node_modules/request/node_modules/isstream/isstream.js