{"_id":"@targos/pumpify","_rev":"1-40ceae80b655b446aefcd62987f0d9ee","name":"@targos/pumpify","dist-tags":{"latest":"2.0.0"},"versions":{"2.0.0":{"name":"@targos/pumpify","version":"2.0.0","description":"Combine an array of streams into a single duplex stream using pump and duplexify","main":"index.js","dependencies":{"duplexify":"^4.1.0","inherits":"^2.0.3","pump":"^3.0.0"},"devDependencies":{"tape":"^4.10.2","through2":"^3.0.1"},"scripts":{"test":"tape test.js"},"repository":{"type":"git","url":"git://github.com/targos/pumpify.git"},"keywords":["pump","duplexify","duplex","streams","stream","pipeline","combine"],"author":{"name":"Mathias Buus"},"license":"MIT","bugs":{"url":"https://github.com/targos/pumpify/issues"},"homepage":"https://github.com/mafintosh/pumpify","gitHead":"02bf51c5025ffe31e176c393623f5faae19441b6","_id":"@targos/pumpify@2.0.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-7WyWA+f1nEPhMLxIsLfxhF9VW3VgiE/hrrX4v0MefyH/bRpYTBXMpggKmTnwiSX4TP8UfEA62ttzjryKLq5qcw==","shasum":"ff5127b4cdcbd6adff106d440dc2ccb39dbb27e1","tarball":"https://registry.npmjs.org/@targos/pumpify/-/pumpify-2.0.0.tgz","fileCount":6,"unpackedSize":10158,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdALiMCRA9TVsSAnZWagAATl4P/AiZCfTGfctbMzZ17J2R\nhi6uT0aC5UrFue7SmB+KB/MZ4I4JG3fspFc86dtFAZ8rv7tPRNKytaa4gIzW\nJ7HZwGFIAqSvNLGabRy9wVyT31ejy/bNW5MJNmSk0566RsuKFo974Vw45byt\nd9qnyH8mt3Stj95kSMSRUHILGlWhgaj3+GQIqbXwxoqpALPraoskoxG7uddf\nkX5brENrXeqXEU+AfOzqOCieMt5/0Ff2y3oNEbx/bpt1Eqqr8dFMLP809k8S\npZIc1vicAWqFm1OS8ZCwDUx6AtnDOtXcqZETg26VlFpVsl99xwEvpomt45jg\ndQ5L4S+OO691mrXOxSRRt0HVMC+e/T8meIQhtQlM30E0TQlv7q68uY5OxIyl\nsDGfmaDHucKmlhwXUfiXfNQDDLF1x0oHVbLT0U99eUM4o1v1gdDflleQlktd\nPPDDunNbCS3rgeZWN7J8Gb2zz15v+MTyKAkadb/YltKzr6uLdNq238dVHBp1\nkgVc4WNxryh4ky0DtsgtR6qGho+UOG5V3e53IiS4njy2Qz46ihe8qaAWmyU6\nWhkJDwS5ZPbT2KcMf+Dx5Oj96D5LDf6Ojcf9q48ljQmlW9AWMmHFpwtCNlxk\nv3KvxyVAyqF45VwYvM0UyGwGSyq+31Sek3xj8o/bz69N35998jjf1CfGODa0\n3OuE\r\n=RAk2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDm5JXlff9q91hD6QlHBX4I0pFi2u5Q07hga4UV/kmSdgIhAJXE1demA7AcmYL59Feft4sPPQJx6KU09lQaO4aqfgiv"}]},"maintainers":[{"name":"targos","email":"targos+npm@protonmail.com"}],"_npmUser":{"name":"targos","email":"targos+npm@protonmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pumpify_2.0.0_1560328331787_0.6322069474424417"},"_hasShrinkwrap":false}},"time":{"created":"2019-06-12T08:32:11.761Z","2.0.0":"2019-06-12T08:32:12.009Z","modified":"2022-04-07T04:15:10.850Z"},"maintainers":[{"name":"targos","email":"targos+npm@protonmail.com"}],"description":"Combine an array of streams into a single duplex stream using pump and duplexify","homepage":"https://github.com/mafintosh/pumpify","keywords":["pump","duplexify","duplex","streams","stream","pipeline","combine"],"repository":{"type":"git","url":"git://github.com/targos/pumpify.git"},"author":{"name":"Mathias Buus"},"bugs":{"url":"https://github.com/targos/pumpify/issues"},"license":"MIT","readme":"# pumpify\n\nCombine an array of streams into a single duplex stream using [pump](https://github.com/mafintosh/pump) and [duplexify](https://github.com/mafintosh/duplexify).\nIf one of the streams closes/errors all streams in the pipeline will be destroyed.\n\n```\nnpm install pumpify\n```\n\n[![build status](http://img.shields.io/travis/mafintosh/pumpify.svg?style=flat)](http://travis-ci.org/mafintosh/pumpify)\n\n## Usage\n\nPass the streams you want to pipe together to pumpify `pipeline = pumpify(s1, s2, s3, ...)`.\n`pipeline` is a duplex stream that writes to the first streams and reads from the last one.\nStreams are piped together using [pump](https://github.com/mafintosh/pump) so if one of them closes\nall streams will be destroyed.\n\n``` js\nvar pumpify = require('pumpify')\nvar tar = require('tar-fs')\nvar zlib = require('zlib')\nvar fs = require('fs')\n\nvar untar = pumpify(zlib.createGunzip(), tar.extract('output-folder'))\n// you can also pass an array instead\n// var untar = pumpify([zlib.createGunzip(), tar.extract('output-folder')])\n\nfs.createReadStream('some-gzipped-tarball.tgz').pipe(untar)\n```\n\nIf you are pumping object streams together use `pipeline = pumpify.obj(s1, s2, ...)`.\nCall `pipeline.destroy()` to destroy the pipeline (including the streams passed to pumpify).\n\n### Using `setPipeline(s1, s2, ...)`\n\nSimilar to [duplexify](https://github.com/mafintosh/duplexify) you can also define the pipeline asynchronously using `setPipeline(s1, s2, ...)`\n\n``` js\nvar untar = pumpify()\n\nsetTimeout(function() {\n  // will start draining the input now\n  untar.setPipeline(zlib.createGunzip(), tar.extract('output-folder'))\n}, 1000)\n\nfs.createReadStream('some-gzipped-tarball.tgz').pipe(untar)\n```\n\n## License\n\nMIT\n\n## Related\n\n`pumpify` 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"}