{"_id":"native-duplexpair","_rev":"2991771","name":"native-duplexpair","description":"Make a full duplex stream with 2 Duplex endpoints, using the native version of `Duplex`","dist-tags":{"latest":"1.0.0"},"maintainers":[{"name":"arthurschreiber","email":""}],"time":{"modified":"2023-08-28T09:18:05.000Z","created":"2018-05-10T13:47:05.380Z","1.0.0":"2018-05-10T13:47:05.380Z"},"users":{},"author":{"name":"Anna Henningsen","email":"anna@addaleax.net"},"repository":{"type":"git","url":"git+https://github.com/tediousjs/native-duplexpair.git"},"versions":{"1.0.0":{"name":"native-duplexpair","version":"1.0.0","description":"Make a full duplex stream with 2 Duplex endpoints, using the native version of `Duplex`","engine":">=4.0.0","main":"index.js","directories":{"test":"test"},"devDependencies":{"mocha":"^4.0.1","nyc":"^11.3.0"},"scripts":{"test":"nyc mocha"},"repository":{"type":"git","url":"git+https://github.com/tediousjs/native-duplexpair.git"},"keywords":["duplex","pair","streams","socket"],"author":{"name":"Anna Henningsen","email":"anna@addaleax.net"},"license":"MIT","bugs":{"url":"https://github.com/tediousjs/native-duplexpair/issues"},"homepage":"https://github.com/tediousjs/native-duplexpair#readme","gitHead":"96f40bf5dd241dad69ad540054dfe33738682738","_id":"native-duplexpair@1.0.0","_shasum":"7899078e64bf3c8a3d732601b3d40ff05db58fa0","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.8.4","_npmUser":{"name":"arthurschreiber","email":"schreiber.arthur@googlemail.com"},"dist":{"shasum":"7899078e64bf3c8a3d732601b3d40ff05db58fa0","size":3798,"noattachment":false,"key":"/native-duplexpair/-/native-duplexpair-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/native-duplexpair/download/native-duplexpair-1.0.0.tgz"},"maintainers":[{"name":"arthurschreiber","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/native-duplexpair_1.0.0_1525960025280_0.8876847239991936"},"_hasShrinkwrap":false,"publish_time":1525960025380,"_cnpm_publish_time":1525960025380,"_cnpmcore_publish_time":"2021-12-16T15:42:23.895Z"}},"readme":"duplexpair\n==============\n\n[![NPM Version](https://img.shields.io/npm/v/duplexpair.svg?style=flat)](https://npmjs.org/package/duplexpair)\n[![NPM Downloads](https://img.shields.io/npm/dm/duplexpair.svg?style=flat)](https://npmjs.org/package/duplexpair)\n[![Build Status](https://travis-ci.org/addaleax/duplexpair.svg?style=flat&branch=master)](https://travis-ci.org/addaleax/duplexpair?branch=master)\n[![Coverage Status](https://coveralls.io/repos/addaleax/duplexpair/badge.svg?branch=master)](https://coveralls.io/r/addaleax/duplexpair?branch=master)\n[![Dependency Status](https://david-dm.org/addaleax/duplexpair.svg?style=flat)](https://david-dm.org/addaleax/duplexpair)\n\nMake a full duplex stream with 2 Duplex endpoints.\n\n**Note:**\n\nThis is a fork of `duplexpair`, changed to use the \"native\" `Duplex` stream that is part\nof Node.JS instead of the version from the `readable-stream` package.\n\nInstall:\n`npm install native-duplexpair`\n\n```js\nconst DuplexPair = require('native-duplexpair');\n\nconst { socket1, socket2 } = new DuplexPair();\n\nsocket1.write('Hi');\nconsole.log(socket2.read());  // => <Buffer 48 69>\n\n// Or, using options that are passed to the Duplex constructor:\n\nconst { socket1, socket2 } = new DuplexPair({ encoding: 'utf8' });\n\nsocket1.write('Hi');\nconsole.log(socket2.read());  // => 'Hi'\n```\n\nLicense\n=======\n\nMIT\n","_attachments":{},"homepage":"https://github.com/tediousjs/native-duplexpair#readme","bugs":{"url":"https://github.com/tediousjs/native-duplexpair/issues"},"license":"MIT"}