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