Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

isstream.js 588B

123456789101112131415161718192021222324252627
  1. var stream = require('stream')
  2. function isStream (obj) {
  3. return obj instanceof stream.Stream
  4. }
  5. function isReadable (obj) {
  6. return isStream(obj) && typeof obj._read == 'function' && typeof obj._readableState == 'object'
  7. }
  8. function isWritable (obj) {
  9. return isStream(obj) && typeof obj._write == 'function' && typeof obj._writableState == 'object'
  10. }
  11. function isDuplex (obj) {
  12. return isReadable(obj) && isWritable(obj)
  13. }
  14. module.exports = isStream
  15. module.exports.isReadable = isReadable
  16. module.exports.isWritable = isWritable
  17. module.exports.isDuplex = isDuplex