Name Last Update
..
LICENSE Loading commit data...
README.md Loading commit data...
index.js Loading commit data...
package.json Loading commit data...

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.