Hello, Node devs. This will be a quick one today.
I was recently implementing a Duplex Stream in Node js for a use case at work. I had everything set up just like I wanted. I had my abstractions in place for where the data was coming from, I had the consumer of the data all ready to go, and, yes, I even had tests already written. Here is some very basic boilerplate for a Duplex Stream that just saves the incoming data to a buffer.