{"id":13454485,"url":"https://github.com/mafintosh/pumpify","last_synced_at":"2025-05-15T08:06:55.271Z","repository":{"id":18542195,"uuid":"21743200","full_name":"mafintosh/pumpify","owner":"mafintosh","description":"Combine an array of streams into a single duplex stream using pump and duplexify","archived":false,"fork":false,"pushed_at":"2024-06-14T07:47:20.000Z","size":26,"stargazers_count":255,"open_issues_count":4,"forks_count":14,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-27T14:11:14.302Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mafintosh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-07-11T16:23:47.000Z","updated_at":"2025-02-11T15:47:43.000Z","dependencies_parsed_at":"2024-06-14T08:54:44.167Z","dependency_job_id":"5318e448-040a-4d75-9742-8081746c6678","html_url":"https://github.com/mafintosh/pumpify","commit_stats":{"total_commits":57,"total_committers":5,"mean_commits":11.4,"dds":0.07017543859649122,"last_synced_commit":"96d0fbfd17cfec6033d1878e81c0d512f509d8f4"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mafintosh%2Fpumpify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mafintosh%2Fpumpify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mafintosh%2Fpumpify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mafintosh%2Fpumpify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mafintosh","download_url":"https://codeload.github.com/mafintosh/pumpify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247024149,"owners_count":20870940,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T08:00:54.577Z","updated_at":"2025-04-03T15:07:46.647Z","avatar_url":"https://github.com/mafintosh.png","language":"JavaScript","funding_links":[],"categories":["Packages","Repository","包","目录","Streams","JavaScript"],"sub_categories":["Streams","文件流","流处理","流"],"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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmafintosh%2Fpumpify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmafintosh%2Fpumpify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmafintosh%2Fpumpify/lists"}