npm.io
1.0.0 • Published 6 years ago

end-of-stream-promise

Licence
MIT
Version
1.0.0
Deps
1
Size
3 kB
Vulns
0
Weekly
0
Stars
1

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.

Keywords