Make a full duplex stream with 2 Duplex endpoints
npm install duplexpairduplexpair
==============





Make a full duplex stream with 2 Duplex endpoints.
Install:npm install duplexpair
``js
const DuplexPair = require('duplexpair');
const { socket1, socket2 } = new DuplexPair();
socket1.write('Hi');
console.log(socket2.read()); // =>
// Or, using options that are passed to the Duplex constructor:
const { socket1, socket2 } = new DuplexPair({ encoding: 'utf8' });
socket1.write('Hi');
console.log(socket2.read()); // => 'Hi'
``
License
=======
MIT