@zkochan/pnpm
Version:
Fast, disk space efficient package manager
109 lines (108 loc) • 6.52 kB
JSON
{
"_args": [
[
{
"raw": "duplexify@^3.4.2",
"scope": null,
"escapedName": "duplexify",
"name": "duplexify",
"rawSpec": "^3.4.2",
"spec": ">=3.4.2 <4.0.0",
"type": "range"
},
"/home/zkochan/src/pnpm/packages/pnpm/node_modules/mississippi"
]
],
"_from": "duplexify@>=3.4.2 <4.0.0",
"_id": "duplexify@3.6.0",
"_inCache": true,
"_location": "/duplexify",
"_nodeVersion": "9.11.1",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/duplexify_3.6.0_1525429943186_0.29469811383753375"
},
"_npmUser": {
"name": "mafintosh",
"email": "mathiasbuus@gmail.com"
},
"_npmVersion": "5.6.0",
"_phantomChildren": {},
"_requested": {
"raw": "duplexify@^3.4.2",
"scope": null,
"escapedName": "duplexify",
"name": "duplexify",
"rawSpec": "^3.4.2",
"spec": ">=3.4.2 <4.0.0",
"type": "range"
},
"_requiredBy": [
"/mississippi",
"/peek-stream",
"/pumpify"
],
"_resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.6.0.tgz",
"_shasum": "592903f5d80b38d037220541264d69a198fb3410",
"_shrinkwrap": null,
"_spec": "duplexify@^3.4.2",
"_where": "/home/zkochan/src/pnpm/packages/pnpm/node_modules/mississippi",
"author": {
"name": "Mathias Buus"
},
"bugs": {
"url": "https://github.com/mafintosh/duplexify/issues"
},
"dependencies": {
"end-of-stream": "^1.0.0",
"inherits": "^2.0.1",
"readable-stream": "^2.0.0",
"stream-shift": "^1.0.0"
},
"description": "Turn a writable and readable stream into a streams2 duplex stream with support for async initialization and streams1/streams2 input",
"devDependencies": {
"concat-stream": "^1.5.2",
"tape": "^4.0.0",
"through2": "^2.0.0"
},
"directories": {},
"dist": {
"integrity": "sha512-fO3Di4tBKJpYTFHAxTU00BcfWMY9w24r/x21a6rZRbsD/ToUgGxsMbiGRmB7uVAXeGKXD9MwiLZa5E97EVgIRQ==",
"shasum": "592903f5d80b38d037220541264d69a198fb3410",
"tarball": "https://registry.npmjs.org/duplexify/-/duplexify-3.6.0.tgz",
"fileCount": 7,
"unpackedSize": 17028,
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa7Da4CRA9TVsSAnZWagAAI/MP/jhjYwvqItkwaxMrtysy\n72hUFU9D4JPxCDMuGg3fl+dwfwl15YFynNO6Gsye3OP/BB4HpQbsjfb7KE1L\ne8YQFmr+omFnYyhHlOOprzmIrrRHk7Z/J+V0TN5IiCVh4aB/5kElXAUoXAO0\ng98gfnUv9OIDAiv/GqiMP/5gzjcuHzpsf08fitMGTOoD7l7PHq8wrbRf/Irn\noerndhQ/2F6Cp+/YUJ2hu+56JDW20MDRHRNqBb9yixgnfzPn6xjRYKpIbktw\nUW5BdoyVRibrSoTi+p4TLg9JweU5++SHWBweGnBk2jyuuz6VADJ9eP4Qwp2v\njfFzTYPWjimRyx2WP7bhVAWiV+7tM9ngyV4Yr9grzdHVTa4olrWyYlqBTfoV\na/VMmxufrjfkJ4Kf9fhXcBIfDisryesgX+PCjvSDqZ07TTnuVYgBnKM3JFeX\nTbQ14q2yfmNk21QinQjNmCOLuMp2XI+tyHTFB+Cc+UT9y9lSSQm87ZktpZS3\n+Lz30cae9kVI20NQCFIOHrcyMzI/ooGSsT6g8wvpD/+fp9Hy1D0LQXq4kEsy\nKO9oj3fQMWdaqgZRH+30VpmBU+0IJUz4zU72HzVwM/LlCU/GISFF2z1odOen\nH4X03+88HDjRMuimaRermdvcQGZQabXSn1ImiUqC7PKDGlgCd6BndE+YyoNQ\nUoqs\r\n=Y7X8\r\n-----END PGP SIGNATURE-----\r\n"
},
"gitHead": "f81db336f8b576f9b39afa2ea2a7bc12da3bb6b1",
"homepage": "https://github.com/mafintosh/duplexify",
"keywords": [
"duplex",
"streams2",
"streams",
"stream",
"writable",
"readable",
"async"
],
"license": "MIT",
"main": "index.js",
"maintainers": [
{
"name": "mafintosh",
"email": "mathiasbuus@gmail.com"
}
],
"name": "duplexify",
"optionalDependencies": {},
"readme": "# duplexify\n\nTurn a writeable and readable stream into a single streams2 duplex stream.\n\nSimilar to [duplexer2](https://github.com/deoxxa/duplexer2) except it supports both streams2 and streams1 as input\nand it allows you to set the readable and writable part asynchronously using `setReadable(stream)` and `setWritable(stream)`\n\n```\nnpm install duplexify\n```\n\n[](http://travis-ci.org/mafintosh/duplexify)\n\n## Usage\n\nUse `duplexify(writable, readable, streamOptions)` (or `duplexify.obj(writable, readable)` to create an object stream)\n\n``` js\nvar duplexify = require('duplexify')\n\n// turn writableStream and readableStream into a single duplex stream\nvar dup = duplexify(writableStream, readableStream)\n\ndup.write('hello world') // will write to writableStream\ndup.on('data', function(data) {\n // will read from readableStream\n})\n```\n\nYou can also set the readable and writable parts asynchronously\n\n``` js\nvar dup = duplexify()\n\ndup.write('hello world') // write will buffer until the writable\n // part has been set\n\n// wait a bit ...\ndup.setReadable(readableStream)\n\n// maybe wait some more?\ndup.setWritable(writableStream)\n```\n\nIf you call `setReadable` or `setWritable` multiple times it will unregister the previous readable/writable stream.\nTo disable the readable or writable part call `setReadable` or `setWritable` with `null`.\n\nIf the readable or writable streams emits an error or close it will destroy both streams and bubble up the event.\nYou can also explicitly destroy the streams by calling `dup.destroy()`. The `destroy` method optionally takes an\nerror object as argument, in which case the error is emitted as part of the `error` event.\n\n``` js\ndup.on('error', function(err) {\n console.log('readable or writable emitted an error - close will follow')\n})\n\ndup.on('close', function() {\n console.log('the duplex stream is destroyed')\n})\n\ndup.destroy() // calls destroy on the readable and writable part (if present)\n```\n\n## HTTP request example\n\nTurn a node core http request into a duplex stream is as easy as\n\n``` js\nvar duplexify = require('duplexify')\nvar http = require('http')\n\nvar request = function(opts) {\n var req = http.request(opts)\n var dup = duplexify(req)\n req.on('response', function(res) {\n dup.setReadable(res)\n })\n return dup\n}\n\nvar req = request({\n method: 'GET',\n host: 'www.google.com',\n port: 80\n})\n\nreq.end()\nreq.pipe(process.stdout)\n```\n\n## License\n\nMIT\n\n## Related\n\n`duplexify` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.\n",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git://github.com/mafintosh/duplexify.git"
},
"scripts": {
"test": "tape test.js"
},
"version": "3.6.0"
}