4.0.0 • Published 1 year ago

stream-read-all v4.0.0

Weekly downloads
12,844
License
MIT
Repository
github
Last release
1 year ago

view on npm npm module downloads Gihub repo dependents Gihub package dependents Node.js CI js-standard-style

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.