Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

readme.md 861B

před 4 roky
123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # to-readable-stream [![Build Status](https://travis-ci.org/sindresorhus/to-readable-stream.svg?branch=master)](https://travis-ci.org/sindresorhus/to-readable-stream)
  2. > Convert a string/Buffer/Uint8Array to a [readable stream](https://nodejs.org/api/stream.html#stream_readable_streams)
  3. ## Install
  4. ```
  5. $ npm install to-readable-stream
  6. ```
  7. ## Usage
  8. ```js
  9. const toReadableStream = require('to-readable-stream');
  10. toReadableStream('🦄🌈').pipe(process.stdout);
  11. ```
  12. ## API
  13. ### toReadableStream(input)
  14. Returns a [`stream.Readable`](https://nodejs.org/api/stream.html#stream_readable_streams).
  15. #### input
  16. Type: `string` `Buffer` `Uint8Array`
  17. Value to convert to a stream.
  18. ## Related
  19. - [into-stream](https://github.com/sindresorhus/into-stream) - More advanced version of this module
  20. ## License
  21. MIT © [Sindre Sorhus](https://sindresorhus.com)