Détail du package

end-of-stream-promise

RangerMauve1.8kMIT1.0.0

Await the completion or erroring of a stream

end, stream, promise, await

readme

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.