Closed rhodgkins closed 2 years ago
https://github.com/nodejs/readable-stream/blob/e95c7617af81755d91aee0d3de16af9ae47960de/lib/internal/streams/end-of-stream.js#L245-L255
Should the promise version of finished call the clean up function returned from the callback version?
finished
So something like:
function finished(stream, opts) { return new Promise((resolve, reject) => { const cleanup = eos(stream, opts, (err) => { cleanup() if (err) { reject(err) } else { resolve() } }) }) }
Also raised in the main repo nodejs/node#44556
Closed in favor of https://github.com/nodejs/node/issues/44556
https://github.com/nodejs/readable-stream/blob/e95c7617af81755d91aee0d3de16af9ae47960de/lib/internal/streams/end-of-stream.js#L245-L255
Should the promise version of
finished
call the clean up function returned from the callback version?So something like:
Also raised in the main repo nodejs/node#44556