end-of-stream-promise

1.0.0 • Public • Published

end-of-stream-promise

Await the completion or erroring of a stream

npm i -s end-of-stream-promise
const eosp = require('end-of-stream-promise')
 
const stream = getSomeStream()
 
try {
  await eosp(stream)
} catch(e) {
  console.log('Stream had an error!')
}

Check out the end-of-stream docs for more options.

Package Sidebar

Install

npm i end-of-stream-promise

Weekly Downloads

502

Version

1.0.0

License

MIT

Unpacked Size

3.2 kB

Total Files

5

Last publish

Collaborators

  • rangermauve