| 1 |
{ |
| 2 |
"_id": "duplexer3", |
| 3 |
"_rev": "15-ebaf045091675fbc8d8537dc0fa1e1e3", |
| 4 |
"name": "duplexer3", |
| 5 |
"description": "Like duplexer but using streams3", |
| 6 |
"dist-tags": { |
| 7 |
"latest": "0.1.4" |
| 8 |
}, |
| 9 |
"versions": { |
| 10 |
"0.1.4": { |
| 11 |
"name": "duplexer3", |
| 12 |
"version": "0.1.4", |
| 13 |
"description": "Like duplexer but using streams3", |
| 14 |
"engine": { |
| 15 |
"node": ">=4" |
| 16 |
}, |
| 17 |
"files": [ |
| 18 |
"index.js" |
| 19 |
], |
| 20 |
"scripts": { |
| 21 |
"test": "mocha -R tap" |
| 22 |
}, |
| 23 |
"repository": { |
| 24 |
"type": "git", |
| 25 |
"url": "https://github.com/floatdrop/duplexer3" |
| 26 |
}, |
| 27 |
"keywords": [ |
| 28 |
"duplex", |
| 29 |
"duplexer", |
| 30 |
"stream", |
| 31 |
"stream3", |
| 32 |
"join", |
| 33 |
"combine" |
| 34 |
], |
| 35 |
"author": { |
| 36 |
"name": "Conrad Pankoff", |
| 37 |
"email": "[email protected]", |
| 38 |
"url": "http://www.fknsrs.biz/" |
| 39 |
}, |
| 40 |
"license": "BSD-3-Clause", |
| 41 |
"devDependencies": { |
| 42 |
"mocha": "^2.2.5" |
| 43 |
}, |
| 44 |
"gitHead": "810f45fd7216a4ec4585e673ad28f05852ed05a6", |
| 45 |
"bugs": { |
| 46 |
"url": "https://github.com/floatdrop/duplexer3/issues" |
| 47 |
}, |
| 48 |
"homepage": "https://github.com/floatdrop/duplexer3", |
| 49 |
"_id": "[email protected]", |
| 50 |
"_shasum": "ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2", |
| 51 |
"_from": ".", |
| 52 |
"_npmVersion": "2.14.7", |
| 53 |
"_nodeVersion": "4.2.3", |
| 54 |
"_npmUser": { |
| 55 |
"name": "floatdrop", |
| 56 |
"email": "[email protected]" |
| 57 |
}, |
| 58 |
"dist": { |
| 59 |
"shasum": "ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2", |
| 60 |
"tarball": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz" |
| 61 |
}, |
| 62 |
"maintainers": [ |
| 63 |
{ |
| 64 |
"name": "floatdrop", |
| 65 |
"email": "[email protected]" |
| 66 |
} |
| 67 |
], |
| 68 |
"directories": {} |
| 69 |
} |
| 70 |
}, |
| 71 |
"readme": "# duplexer3 [](https://travis-ci.org/floatdrop/duplexer3) [](https://coveralls.io/github/floatdrop/duplexer3?branch=master)\n\nLike [duplexer2](https://github.com/deoxxa/duplexer2) but using Streams3 without readable-stream dependency\n\n```javascript\nvar stream = require(\"stream\");\n\nvar duplexer3 = require(\"duplexer3\");\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 = duplexer3(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 duplexer3\n```\n\n## API\n\n### duplexer3\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\nduplexer3([options], writable, readable)\n```\n\n```javascript\nconst duplex = duplexer3(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 ([[email protected]](mailto:[email protected]))\n", |
| 72 |
"maintainers": [ |
| 73 |
{ |
| 74 |
"name": "floatdrop", |
| 75 |
"email": "[email protected]" |
| 76 |
} |
| 77 |
], |
| 78 |
"time": { |
| 79 |
"modified": "2018-01-11T02:23:57.067Z", |
| 80 |
"created": "2016-01-11T12:09:25.153Z", |
| 81 |
"0.1.4": "2016-01-11T12:09:25.153Z" |
| 82 |
}, |
| 83 |
"homepage": "https://github.com/floatdrop/duplexer3", |
| 84 |
"keywords": [ |
| 85 |
"duplex", |
| 86 |
"duplexer", |
| 87 |
"stream", |
| 88 |
"stream3", |
| 89 |
"join", |
| 90 |
"combine" |
| 91 |
], |
| 92 |
"repository": { |
| 93 |
"type": "git", |
| 94 |
"url": "https://github.com/floatdrop/duplexer3" |
| 95 |
}, |
| 96 |
"author": { |
| 97 |
"name": "Conrad Pankoff", |
| 98 |
"email": "[email protected]", |
| 99 |
"url": "http://www.fknsrs.biz/" |
| 100 |
}, |
| 101 |
"bugs": { |
| 102 |
"url": "https://github.com/floatdrop/duplexer3/issues" |
| 103 |
}, |
| 104 |
"license": "BSD-3-Clause", |
| 105 |
"readmeFilename": "README.md", |
| 106 |
"_attachments": {} |
| 107 |
} |