Call a callback when a readable/writable/duplex stream has completed or failed.
Browse cluster: Node.js HTTP utilities & middleware →end-of-stream is a Node.js module that invokes a callback function when a readable, writable, or duplex stream completes or encounters an error. The module supports legacy streams, streams2, and stream3 implementations, and allows callers to pass a stream and callback to the `eos` function, with optional configuration to handle only specific stream directions or error conditions. It is part of the mississippi stream utility collection.