Node.js has an easy way to couple two datastreams:
readableStream.pipe(writeableStream);
… and it’s great because it handles buffering and such for you behind the scenes.
What’s the best way to decouple those two streams without closing either of them?
You can find the source code for Stream.pipe in the git repository, and I do not see a clear way to decouple it other than one of the streams ending, or closing.
Pipe is nothing more than once a stream receives data, the other one is written to, so it would be rather simple to write your own implementation, with your own needs.