{
  "_id": "duplexer2",
  "maintainers": [
    {
      "name": "deoxxa",
      "email": "deoxxa@fknsrs.biz"
    },
    {
      "name": "shinnn",
      "email": "snnskwtnb@gmail.com"
    },
    {
      "name": "zertosh",
      "email": "zertosh@gmail.com"
    }
  ],
  "keywords": [
    "duplex",
    "duplexer",
    "stream",
    "stream3",
    "join",
    "combine"
  ],
  "dist-tags": {
    "latest": "0.1.4"
  },
  "author": {
    "name": "Conrad Pankoff",
    "email": "deoxxa@fknsrs.biz",
    "url": "http://www.fknsrs.biz/"
  },
  "_rev": "31-5ef055c34744e4b3bb6a42d9774306e4",
  "description": "Like duplexer but using streams3",
  "readme": "# duplexer2 [![Build Status](https://travis-ci.org/deoxxa/duplexer2.svg?branch=master)](https://travis-ci.org/deoxxa/duplexer2) [![Coverage Status](https://coveralls.io/repos/deoxxa/duplexer2/badge.svg?branch=master&service=github)](https://coveralls.io/github/deoxxa/duplexer2?branch=master)\n\nLike [duplexer](https://github.com/Raynos/duplexer) but using Streams3\n\n```javascript\nvar stream = require(\"stream\");\n\nvar duplexer2 = require(\"duplexer2\");\n\nvar writable = new stream.Writable({objectMode: true}),\n    readable = new stream.Readable({objectMode: true});\n\nwritable._write = function _write(input, encoding, done) {\n  if (readable.push(input)) {\n    return done();\n  } else {\n    readable.once(\"drain\", done);\n  }\n};\n\nreadable._read = function _read(n) {\n  // no-op\n};\n\n// simulate the readable thing closing after a bit\nwritable.once(\"finish\", function() {\n  setTimeout(function() {\n    readable.push(null);\n  }, 500);\n});\n\nvar duplex = duplexer2(writable, readable);\n\nduplex.on(\"data\", function(e) {\n  console.log(\"got data\", JSON.stringify(e));\n});\n\nduplex.on(\"finish\", function() {\n  console.log(\"got finish event\");\n});\n\nduplex.on(\"end\", function() {\n  console.log(\"got end event\");\n});\n\nduplex.write(\"oh, hi there\", function() {\n  console.log(\"finished writing\");\n});\n\nduplex.end(function() {\n  console.log(\"finished ending\");\n});\n```\n\n```\ngot data \"oh, hi there\"\nfinished writing\ngot finish event\nfinished ending\ngot end event\n```\n\n## Overview\n\nThis is a reimplementation of [duplexer](https://www.npmjs.com/package/duplexer) using the\nStreams3 API which is standard in Node as of v4. Everything largely\nworks the same.\n\n\n\n## Installation\n\n[Available via `npm`](https://docs.npmjs.com/cli/install):\n\n```\n$ npm i duplexer2\n```\n\n## API\n\n### duplexer2\n\nCreates a new `DuplexWrapper` object, which is the actual class that implements\nmost of the fun stuff. All that fun stuff is hidden. DON'T LOOK.\n\n```javascript\nduplexer2([options], writable, readable)\n```\n\n```javascript\nconst duplex = duplexer2(new stream.Writable(), new stream.Readable());\n```\n\nArguments\n\n* __options__ - an object specifying the regular `stream.Duplex` options, as\n  well as the properties described below.\n* __writable__ - a writable stream\n* __readable__ - a readable stream\n\nOptions\n\n* __bubbleErrors__ - a boolean value that specifies whether to bubble errors\n  from the underlying readable/writable streams. Default is `true`.\n\n\n## License\n\n3-clause BSD. [A copy](./LICENSE) is included with the source.\n\n## Contact\n\n* GitHub ([deoxxa](http://github.com/deoxxa))\n* Twitter ([@deoxxa](http://twitter.com/deoxxa))\n* Email ([deoxxa@fknsrs.biz](mailto:deoxxa@fknsrs.biz))\n",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/deoxxa/duplexer2.git"
  },
  "users": {
    "alanshaw": true,
    "ryanj": true,
    "simplyianm": true,
    "akiva": true,
    "alexkval": true,
    "staraple": true,
    "plitat": true,
    "edin-m": true,
    "wenbing": true,
    "0x4c3p": true,
    "deubaka": true,
    "sirrah": true,
    "ezodude": true,
    "nickleefly": true,
    "edigi135": true,
    "1two3code": true,
    "flumpus-dev": true
  },
  "bugs": {
    "url": "https://github.com/deoxxa/duplexer2/issues"
  },
  "license": "BSD-3-Clause",
  "versions": {
    "0.0.1": {
      "name": "duplexer2",
      "version": "0.0.1",
      "description": "Like duplexer (http://npm.im/duplexer) but using streams2",
      "main": "index.js",
      "scripts": {
        "test": "mocha -R tap"
      },
      "repository": {
        "type": "git",
        "url": "git://github.com/deoxxa/duplexer2.git"
      },
      "keywords": [
        "duplex",
        "stream",
        "join",
        "combine"
      ],
      "author": {
        "name": "Conrad Pankoff",
        "email": "deoxxa@fknsrs.biz",
        "url": "http://www.fknsrs.biz/"
      },
      "license": "BSD",
      "bugs": {
        "url": "https://github.com/deoxxa/duplexer2/issues"
      },
      "devDependencies": {
        "chai": "~1.7.2",
        "mocha": "~1.12.1"
      },
      "_id": "duplexer2@0.0.1",
      "dist": {
        "shasum": "f8a276687b0b122a466e2bbc8f6a22043cb15d26",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/duplexer2/-/duplexer2-0.0.1.tgz",
        "integrity": "sha512-ZBQUdmw8m+duJA7MvOye1W0ZMTKdwGeMkEfqJRSe/kkoc9PG6dfu6Q8j3ApNLcqo1HEqtvkiL9brmPOqEOTl2Q==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEQCIChb242k2wVbcPtaQPU9fiUrn8PUa/WkFnLZyU4lQSP+AiBR0Lk7hTm65nwSXi96m8HqqKiaNX04Ge7S2Ix1vpgiRg=="
          }
        ]
      },
      "_from": ".",
      "_npmVersion": "1.2.32",
      "_npmUser": {
        "name": "deoxxa",
        "email": "deoxxa@fknsrs.biz"
      },
      "maintainers": [
        {
          "name": "deoxxa",
          "email": "deoxxa@fknsrs.biz"
        }
      ],
      "directories": {}
    },
    "0.0.2": {
      "name": "duplexer2",
      "version": "0.0.2",
      "description": "Like duplexer (http://npm.im/duplexer) but using streams2",
      "main": "index.js",
      "scripts": {
        "test": "mocha -R tap"
      },
      "repository": {
        "type": "git",
        "url": "git://github.com/deoxxa/duplexer2.git"
      },
      "keywords": [
        "duplex",
        "stream",
        "join",
        "combine"
      ],
      "author": {
        "name": "Conrad Pankoff",
        "email": "deoxxa@fknsrs.biz",
        "url": "http://www.fknsrs.biz/"
      },
      "license": "BSD",
      "bugs": {
        "url": "https://github.com/deoxxa/duplexer2/issues"
      },
      "devDependencies": {
        "chai": "~1.7.2",
        "mocha": "~1.12.1"
      },
      "dependencies": {
        "readable-stream": "~1.1.9"
      },
      "homepage": "https://github.com/deoxxa/duplexer2",
      "_id": "duplexer2@0.0.2",
      "dist": {
        "shasum": "c614dcf67e2fb14995a91711e5a617e8a60a31db",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/duplexer2/-/duplexer2-0.0.2.tgz",
        "integrity": "sha512-+AWBwjGadtksxjOQSFDhPNQbed7icNXApT4+2BNpsXzcCBiInq2H9XW0O8sfHFaPmnQRs7cg/P0fAr2IWQSW0g==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEYCIQCS0M+/yCIKannC2BwC/IMXhJrTyEiW4z8O4EtHKVxSHQIhANJTsIfuHVZFNST1Y7CuWluOsFrwwIq2RRNsa7fLFRLK"
          }
        ]
      },
      "_from": ".",
      "_npmVersion": "1.4.3",
      "_npmUser": {
        "name": "deoxxa",
        "email": "deoxxa@fknsrs.biz"
      },
      "maintainers": [
        {
          "name": "deoxxa",
          "email": "deoxxa@fknsrs.biz"
        }
      ],
      "directories": {}
    },
    "0.1.0": {
      "name": "duplexer2",
      "version": "0.1.0",
      "description": "Like duplexer but using streams3",
      "files": [
        "index.js"
      ],
      "scripts": {
        "test": "node --harmony_destructuring --throw-deprecation --trace-sync-io --track-heap-objects node_modules/mocha/bin/_mocha",
        "coverage": "node --harmony_destructuring node_modules/.bin/istanbul cover _mocha"
      },
      "repository": {
        "type": "git",
        "url": "git+https://github.com/deoxxa/duplexer2.git"
      },
      "keywords": [
        "duplex",
        "duplexer",
        "stream",
        "stream3",
        "join",
        "combine"
      ],
      "author": {
        "name": "Conrad Pankoff",
        "email": "deoxxa@fknsrs.biz",
        "url": "http://www.fknsrs.biz/"
      },
      "license": "BSD-3-Clause",
      "dependencies": {
        "readable-stream": "^2.0.2"
      },
      "devDependencies": {
        "istanbul": "^0.3.20",
        "mocha": "^2.2.5"
      },
      "gitHead": "af38f7b1229d53e343bc65a13c1fc780ea5c9178",
      "bugs": {
        "url": "https://github.com/deoxxa/duplexer2/issues"
      },
      "homepage": "https://github.com/deoxxa/duplexer2#readme",
      "_id": "duplexer2@0.1.0",
      "_shasum": "90c7ad5dbfba99fce92c2dd64aaaeae2a650d91f",
      "_from": ".",
      "_npmVersion": "2.14.4",
      "_nodeVersion": "4.1.1",
      "_npmUser": {
        "name": "shinnn",
        "email": "snnskwtnb@gmail.com"
      },
      "maintainers": [
        {
          "name": "deoxxa",
          "email": "deoxxa@fknsrs.biz"
        },
        {
          "name": "shinnn",
          "email": "snnskwtnb@gmail.com"
        }
      ],
      "dist": {
        "shasum": "90c7ad5dbfba99fce92c2dd64aaaeae2a650d91f",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/duplexer2/-/duplexer2-0.1.0.tgz",
        "integrity": "sha512-wKKVpLk2XXyKYd3LiZcYmepnoMp1F+7AQgVEddWMuiCc59bPbVwjdxkrkSDdn4Bcjg/hz4celEB/irl8FUxcZg==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEQCIFSbRpc8talgHbr7O0HzDooLSDj9vu7FMjqtLWyQV+L3AiAR3lfj0WonJXaUJKEOpaVZgAu3+Yn5T5JvT3huguzEoA=="
          }
        ]
      },
      "directories": {}
    },
    "0.1.1": {
      "name": "duplexer2",
      "version": "0.1.1",
      "description": "Like duplexer but using streams3",
      "files": [
        "index.js"
      ],
      "scripts": {
        "pretest": "eslint --config @shinnn/node-legacy --rule 'quotes: [2, double]' example.js --rule 'no-underscore-dangle: 0' index.js test.js",
        "test": "node --strong_mode --harmony_destructuring --harmony_rest_parameters --harmony_spreadcalls --throw-deprecation --trace-sync-io --track-heap-objects test.js | tap-spec",
        "coverage": "node --strong_mode --harmony_destructuring --harmony_rest_parameters --harmony_spreadcalls node_modules/.bin/istanbul cover test.js"
      },
      "repository": {
        "type": "git",
        "url": "git+https://github.com/deoxxa/duplexer2.git"
      },
      "keywords": [
        "duplex",
        "duplexer",
        "stream",
        "stream3",
        "join",
        "combine"
      ],
      "author": {
        "name": "Conrad Pankoff",
        "email": "deoxxa@fknsrs.biz",
        "url": "http://www.fknsrs.biz/"
      },
      "license": "BSD-3-Clause",
      "dependencies": {
        "readable-stream": "^2.0.2"
      },
      "devDependencies": {
        "@shinnn/eslint-config-node-legacy": "^1.0.0",
        "eslint": "^1.7.1",
        "istanbul": "^0.3.22",
        "object-assign": "^4.0.1",
        "tap-spec": "^4.1.0",
        "tape": "^4.2.1",
        "through": "^2.3.8"
      },
      "gitHead": "298ce063bd8a8bdd778db04cac245f8febd03209",
      "bugs": {
        "url": "https://github.com/deoxxa/duplexer2/issues"
      },
      "homepage": "https://github.com/deoxxa/duplexer2#readme",
      "_id": "duplexer2@0.1.1",
      "_shasum": "e75f91a7c89f34c66e8492597aeac1e948d11cdd",
      "_from": ".",
      "_npmVersion": "3.3.8",
      "_nodeVersion": "4.2.1",
      "_npmUser": {
        "name": "shinnn",
        "email": "snnskwtnb@gmail.com"
      },
      "maintainers": [
        {
          "name": "deoxxa",
          "email": "deoxxa@fknsrs.biz"
        },
        {
          "name": "shinnn",
          "email": "snnskwtnb@gmail.com"
        }
      ],
      "dist": {
        "shasum": "e75f91a7c89f34c66e8492597aeac1e948d11cdd",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/duplexer2/-/duplexer2-0.1.1.tgz",
        "integrity": "sha512-fOkZPTcKvGkd05rbh/oGGlYhqy8coU1oh03OCgISO9ZgtA8dhOZYAcVNp8lQeAhSpypOJH0i2dTlEZqv11onog==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEQCIGcJljEBIdv2NLbBeHvnXUINiPVy5pIaxAcjFM7EKkEuAiB8sCMgwI5cGEpXy562wroCUn4TrVOTOWfv7m40tc0yvQ=="
          }
        ]
      },
      "directories": {}
    },
    "0.1.2": {
      "name": "duplexer2",
      "version": "0.1.2",
      "description": "Like duplexer but using streams3",
      "files": [
        "index.js"
      ],
      "scripts": {
        "pretest": "eslint --config @shinnn/node-legacy --rule 'quotes: [2, double]' example.js --rule 'no-underscore-dangle: 0' index.js test.js",
        "test": "node --strong_mode --harmony_destructuring --harmony_rest_parameters --harmony_spreadcalls --throw-deprecation --trace-sync-io --track-heap-objects test.js | tap-spec",
        "coverage": "node --strong_mode --harmony_destructuring --harmony_rest_parameters --harmony_spreadcalls node_modules/.bin/istanbul cover test.js"
      },
      "repository": {
        "type": "git",
        "url": "git+https://github.com/deoxxa/duplexer2.git"
      },
      "keywords": [
        "duplex",
        "duplexer",
        "stream",
        "stream3",
        "join",
        "combine"
      ],
      "author": {
        "name": "Conrad Pankoff",
        "email": "deoxxa@fknsrs.biz",
        "url": "http://www.fknsrs.biz/"
      },
      "license": "BSD-3-Clause",
      "dependencies": {
        "readable-stream": "^2.0.2"
      },
      "devDependencies": {
        "@shinnn/eslint-config-node-legacy": "^1.0.0",
        "eslint": "^1.7.1",
        "istanbul": "^0.3.22",
        "object-assign": "^4.0.1",
        "tap-spec": "^4.1.0",
        "tape": "^4.2.1",
        "through": "^2.3.8"
      },
      "gitHead": "a6830be86ae760bcc586e458dbf1fbdacf2e76a2",
      "bugs": {
        "url": "https://github.com/deoxxa/duplexer2/issues"
      },
      "homepage": "https://github.com/deoxxa/duplexer2#readme",
      "_id": "duplexer2@0.1.2",
      "_shasum": "9d5743625528d33dc22010e1c03777e19f3c44dc",
      "_from": ".",
      "_npmVersion": "3.3.8",
      "_nodeVersion": "4.2.1",
      "_npmUser": {
        "name": "shinnn",
        "email": "snnskwtnb@gmail.com"
      },
      "maintainers": [
        {
          "name": "deoxxa",
          "email": "deoxxa@fknsrs.biz"
        },
        {
          "name": "shinnn",
          "email": "snnskwtnb@gmail.com"
        }
      ],
      "dist": {
        "shasum": "9d5743625528d33dc22010e1c03777e19f3c44dc",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/duplexer2/-/duplexer2-0.1.2.tgz",
        "integrity": "sha512-AAdm57pFk6msDjRpyYi/rok2GwsxDS+H3U1+Dj+gnCNSZ89zfgBTu08tYK1tOdzrVkuPoag7j/4BASVPTCzLuQ==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEUCIBoNVUsunCseqrJgB+ik91lFolTTA5+LCc88yZ6/TKCEAiEAjUyL5dfYyO71t5mCabCwcgeXh8MOgeJRMJQBLp2eRBY="
          }
        ]
      },
      "directories": {}
    },
    "0.1.3": {
      "name": "duplexer2",
      "version": "0.1.3",
      "description": "Like duplexer but using streams3",
      "files": [
        "index.js"
      ],
      "scripts": {
        "test": "mocha -R tap"
      },
      "repository": {
        "type": "git",
        "url": "git+https://github.com/deoxxa/duplexer2.git"
      },
      "keywords": [
        "duplex",
        "duplexer",
        "stream",
        "stream3",
        "join",
        "combine"
      ],
      "author": {
        "name": "Conrad Pankoff",
        "email": "deoxxa@fknsrs.biz",
        "url": "http://www.fknsrs.biz/"
      },
      "license": "BSD-3-Clause",
      "dependencies": {
        "readable-stream": "^2.0.2"
      },
      "devDependencies": {
        "mocha": "^2.2.5"
      },
      "gitHead": "c0060b1505c4d841ce915e28286011c3fa40864c",
      "bugs": {
        "url": "https://github.com/deoxxa/duplexer2/issues"
      },
      "homepage": "https://github.com/deoxxa/duplexer2#readme",
      "_id": "duplexer2@0.1.3",
      "_shasum": "89d8b1492f32009869e093ab7e253d6138302ada",
      "_from": ".",
      "_npmVersion": "3.3.6",
      "_nodeVersion": "5.0.0",
      "_npmUser": {
        "name": "zertosh",
        "email": "zertosh@gmail.com"
      },
      "maintainers": [
        {
          "name": "deoxxa",
          "email": "deoxxa@fknsrs.biz"
        },
        {
          "name": "shinnn",
          "email": "snnskwtnb@gmail.com"
        },
        {
          "name": "zertosh",
          "email": "zertosh@gmail.com"
        }
      ],
      "dist": {
        "shasum": "89d8b1492f32009869e093ab7e253d6138302ada",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/duplexer2/-/duplexer2-0.1.3.tgz",
        "integrity": "sha512-uWL44dWbtvZt+GdrQ2EOeiLcvbx2mFk0VrKfYoSKkYquSAJaDDPK2JbukFbafwzEL/qA77kmdMOaT/QH6nk3vA==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEYCIQDTFvsNg8jGt/skoEkuBvk0TWNSjrbxT247QYD9ex+rsgIhAIK+9aYksRkngkwtcVCcBrsjIAjx5/0hLi4/fIE+qDus"
          }
        ]
      },
      "directories": {}
    },
    "0.1.4": {
      "name": "duplexer2",
      "version": "0.1.4",
      "description": "Like duplexer but using streams3",
      "files": [
        "index.js"
      ],
      "scripts": {
        "test": "mocha -R tap"
      },
      "repository": {
        "type": "git",
        "url": "git+https://github.com/deoxxa/duplexer2.git"
      },
      "keywords": [
        "duplex",
        "duplexer",
        "stream",
        "stream3",
        "join",
        "combine"
      ],
      "author": {
        "name": "Conrad Pankoff",
        "email": "deoxxa@fknsrs.biz",
        "url": "http://www.fknsrs.biz/"
      },
      "license": "BSD-3-Clause",
      "dependencies": {
        "readable-stream": "^2.0.2"
      },
      "devDependencies": {
        "mocha": "^2.2.5"
      },
      "gitHead": "7d008c10499de01ba85636b5f77085ced015c37a",
      "bugs": {
        "url": "https://github.com/deoxxa/duplexer2/issues"
      },
      "homepage": "https://github.com/deoxxa/duplexer2#readme",
      "_id": "duplexer2@0.1.4",
      "_shasum": "8b12dab878c0d69e3e7891051662a32fc6bddcc1",
      "_from": ".",
      "_npmVersion": "3.3.6",
      "_nodeVersion": "5.0.0",
      "_npmUser": {
        "name": "zertosh",
        "email": "zertosh@gmail.com"
      },
      "maintainers": [
        {
          "name": "deoxxa",
          "email": "deoxxa@fknsrs.biz"
        },
        {
          "name": "shinnn",
          "email": "snnskwtnb@gmail.com"
        },
        {
          "name": "zertosh",
          "email": "zertosh@gmail.com"
        }
      ],
      "dist": {
        "shasum": "8b12dab878c0d69e3e7891051662a32fc6bddcc1",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/duplexer2/-/duplexer2-0.1.4.tgz",
        "integrity": "sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEYCIQCy5SgVdWmYhDzf56KbsFQfurrLDDF/WTnbVNiGCPNIjAIhAOvP3UIcmAiPjSKPe9G4s4VUBb2qMtUaotMfH5iLxe9G"
          }
        ]
      },
      "directories": {}
    }
  },
  "name": "duplexer2",
  "time": {
    "modified": "2026-05-22T22:16:46.437Z",
    "created": "2013-09-11T13:47:40.685Z",
    "0.0.1": "2013-09-11T13:47:45.494Z",
    "0.0.2": "2014-04-21T01:10:11.515Z",
    "0.1.0": "2015-09-24T18:48:52.293Z",
    "0.1.1": "2015-10-17T03:54:58.185Z",
    "0.1.2": "2015-10-17T19:28:53.689Z",
    "0.1.3": "2015-11-08T04:55:22.850Z",
    "0.1.4": "2015-11-08T08:07:39.098Z"
  },
  "readmeFilename": "README.md",
  "homepage": "https://github.com/deoxxa/duplexer2#readme"
}