Socket
Socket
Sign inDemoInstall

duplexpair

Package Overview
Dependencies
10
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    duplexpair

Make a full duplex stream with 2 Duplex endpoints


Version published
Weekly downloads
18K
decreased by-38.61%
Maintainers
1
Install size
726 kB
Created
Weekly downloads
 

Readme

Source

duplexpair

NPM Version NPM Downloads Build Status Coverage Status Dependency Status

Make a full duplex stream with 2 Duplex endpoints.

Install: npm install duplexpair

const DuplexPair = require('duplexpair');

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

Keywords

FAQs

Last updated on 07 Mar 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc