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.

readme.md 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. # is-stream [![Build Status](https://travis-ci.org/sindresorhus/is-stream.svg?branch=master)](https://travis-ci.org/sindresorhus/is-stream)
  2. > Check if something is a [Node.js stream](https://nodejs.org/api/stream.html)
  3. ## Install
  4. ```
  5. $ npm install is-stream
  6. ```
  7. ## Usage
  8. ```js
  9. const fs = require('fs');
  10. const isStream = require('is-stream');
  11. isStream(fs.createReadStream('unicorn.png'));
  12. //=> true
  13. isStream({});
  14. //=> false
  15. ```
  16. ## API
  17. ### isStream(stream)
  18. Returns a `boolean` for whether it's a [`Stream`](https://nodejs.org/api/stream.html#stream_stream).
  19. #### isStream.writable(stream)
  20. Returns a `boolean` for whether it's a [`stream.Writable`](https://nodejs.org/api/stream.html#stream_class_stream_writable).
  21. #### isStream.readable(stream)
  22. Returns a `boolean` for whether it's a [`stream.Readable`](https://nodejs.org/api/stream.html#stream_class_stream_readable).
  23. #### isStream.duplex(stream)
  24. Returns a `boolean` for whether it's a [`stream.Duplex`](https://nodejs.org/api/stream.html#stream_class_stream_duplex).
  25. #### isStream.transform(stream)
  26. Returns a `boolean` for whether it's a [`stream.Transform`](https://nodejs.org/api/stream.html#stream_class_stream_transform).
  27. ## Related
  28. - [is-file-stream](https://github.com/jamestalmage/is-file-stream) - Detect if a stream is a file stream
  29. ## License
  30. MIT © [Sindre Sorhus](https://sindresorhus.com)