Delay `finish` and `end` events from a `Duplex` stream until both of them have been emitted from their `Writable` and `Readable` parts
npm install finestDelay finish and end events from a Duplex stream until both of them have
been emitted from their Writable and Readable parts
This is useful to be used as a "firewall" to isolate two bi-directional Duplex
streams so the finish or end events are not propagated until we are sure
that both Writable and Readable parts has finished, leaving the other stream
to be still working as a bi-directional one. One use case of this is if you are
using a network protocol that needs a bi-directional transport layer (to send
back messages for ACKs or flow control) and one of the ends emits a finish orend events, so this way the transport layer stream can be isolated from the
application and still works as a bi-directional one.
``sh`
npm install finest
- duplex: Duplex stream that we want to isolateduplexify
- options: options passed to receiver
- receiver: options passed to underlying streamsender` stream
- sender: options passed to underlying