$ gnpm install stream-read-all
Returns a promise which fulfils with the supplied stream's content. Supports both regular and object mode streams.
This example script...
import streamReadAll from 'stream-read-all'
const stdin = await streamReadAll(process.stdin)
console.log(stdin.toString())
...prints this output.
$ echo Hello | node example.js
Hello
© 2017-23 Lloyd Brookes 75pound@gmail.com.
Copyright 2013 - present © cnpmjs.org | Home |