@hishprorg/iure-optio-nihil

3.16.96 • Public • Published

@hishprorg/iure-optio-nihil

NPM Version NPM Downloads Build Status Coverage Status Dependency Status

Make a full duplex stream with 2 Duplex endpoints.

Install: npm install @hishprorg/iure-optio-nihil

const DuplexPair = require('@hishprorg/iure-optio-nihil');

const { socket1, socket2 } = new DuplexPair();

socket1.write('Hi');
console.log(socket2.read());  // => <Buffer 48 69>

// 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

/@hishprorg/iure-optio-nihil/

    Package Sidebar

    Install

    npm i @hishprorg/iure-optio-nihil

    Weekly Downloads

    8

    Version

    3.16.96

    License

    MIT

    Unpacked Size

    173 kB

    Total Files

    461

    Last publish

    Collaborators

    • hatrungvk94