Miss any of our Open RFC calls?Watch the recordings here! »

stream-read-all

3.0.0 • Public • Published

view on npm npm module downloads Build Status Coverage Status Dependency Status js-standard-style

stream-read-all

Returns a promise which resolves once all data in the supplied stream has been read.

This example script...

async function printInput () {
  const streamReadAll = require('stream-read-all')
  const stdin = await streamReadAll(process.stdin)
  console.log(stdin.toString())
}
printInput()

...prints this output.

$ echo Hello | node example.js
Hello

© 2017-20 Lloyd Brookes 75pound@gmail.com.

Install

npm i stream-read-all

DownloadsWeekly Downloads

10,637

Version

3.0.0

License

MIT

Unpacked Size

4.07 kB

Total Files

4

Last publish

Collaborators

  • avatar