stream-read-all

4.0.0 • Public • Published

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.

Package Sidebar

Install

npm i stream-read-all

Weekly Downloads

324,567

Version

4.0.0

License

MIT

Unpacked Size

5.46 kB

Total Files

5

Last publish

Collaborators

  • 75lb