like a passthrough, but in both directions
JavaScript
Switch branches/tags
Latest commit c7af2a6 May 20, 2015 @isaacs v1.0.2
Permalink
Failed to load latest commit information.
LICENSE
README.md readme Jul 15, 2013
dp.js
package.json v1.0.2 May 20, 2015
t.js test Jul 15, 2013

README.md

duplex-passthrough

For when a single passthrough stream is not enough.

USAGE

var dp = new DuplexPassThrough(stream, options);

Or, if the stream is not available yet:

var dp = new DuplexPassThrough(null, options);

// some time later..
dp.wrapStream(stream);

This is useful if you have to buffer up both sides of a duplex stream for some reason, like if you want to read some bits of a socket, but then send it somewhere else, or do other crazy stuff.