on-stream-end
Handles completion and errors of any stream - readable/writable/duplex.
A drop-in replacement for end-of-stream.
Install
npm i on-stream-end --save
Usage
For more use-cases see the tests
const eos =
onStreamEnd
Handles completion and errors of any stream - readable/writable/duplex.
stream
{Stream} stream to listen for completionopts
{Object} optional options objectcallback
{Function} completion callback
Example
const fs = const eos = const readable = fs
More examples
This module is drop-in replacement for
end-of-stream
, just more strictness, more coverage and more tests.
var eos =
Related
- catchup: Graceful error handling. Because core
domain
module is deprecated. - end-of-stream: Call a callback when a readable/writable/duplex stream has completed or failed.
- is-node-emitter: Strictly checks that given value is nodejs EventEmitter.
- is-node-stream: Strictly and correctly checks if value is a nodejs stream.
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
But before doing anything, please read the CONTRIBUTING.md guidelines.