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.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # get-stdin [![Build Status](https://travis-ci.com/sindresorhus/get-stdin.svg?branch=master)](https://travis-ci.com/sindresorhus/get-stdin)
  2. > Get [stdin](https://nodejs.org/api/process.html#process_process_stdin) as a string or buffer
  3. ## Install
  4. ```
  5. $ npm install get-stdin
  6. ```
  7. ## Usage
  8. ```js
  9. // example.js
  10. const getStdin = require('get-stdin');
  11. (async () => {
  12. console.log(await getStdin());
  13. //=> 'unicorns'
  14. })();
  15. ```
  16. ```
  17. $ echo unicorns | node example.js
  18. unicorns
  19. ```
  20. ## API
  21. Both methods returns a promise that is resolved when the `end` event fires on the `stdin` stream, indicating that there is no more data to be read.
  22. ### getStdin()
  23. Get `stdin` as a `string`.
  24. In a TTY context, a promise that resolves to an empty `string` is returned.
  25. ### getStdin.buffer()
  26. Get `stdin` as a `Buffer`.
  27. In a TTY context, a promise that resolves to an empty `Buffer` is returned.
  28. ## Related
  29. - [get-stream](https://github.com/sindresorhus/get-stream) - Get a stream as a string or buffer
  30. ---
  31. <div align="center">
  32. <b>
  33. <a href="https://tidelift.com/subscription/pkg/npm-get-stdin?utm_source=npm-get-stdin&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
  34. </b>
  35. <br>
  36. <sub>
  37. Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
  38. </sub>
  39. </div>