{"id":17445970,"url":"https://github.com/jamen/pull-imux","last_synced_at":"2025-09-25T02:31:00.698Z","repository":{"id":96785082,"uuid":"91152150","full_name":"jamen/pull-imux","owner":"jamen","description":"Transform stream composed of smaller duplex streams","archived":false,"fork":false,"pushed_at":"2017-05-14T05:06:43.000Z","size":16,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-11T22:20:45.950Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/jamen.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":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-13T05:38:55.000Z","updated_at":"2021-12-19T15:37:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"52ebdbd8-11c1-4694-b32a-7b8854e493bc","html_url":"https://github.com/jamen/pull-imux","commit_stats":{"total_commits":13,"total_committers":1,"mean_commits":13.0,"dds":0.0,"last_synced_commit":"b6fb0c89cd711a2cce1f8b4a9a56676fedd9083d"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamen%2Fpull-imux","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamen%2Fpull-imux/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamen%2Fpull-imux/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamen%2Fpull-imux/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jamen","download_url":"https://codeload.github.com/jamen/pull-imux/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234067320,"owners_count":18774218,"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-10-17T18:19:16.084Z","updated_at":"2025-09-25T02:30:55.386Z","avatar_url":"https://github.com/jamen.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# pull-imux\n\n\u003e Transform stream composed of smaller duplex streams\n\nAn inverse MUX stream.  Returns a transform that is composed of channels (duplex streams)\n\n```js\nvar [minify, channels] = imux({\n  js: file =\u003e extname(file.path) === '.js',\n  css: file =\u003e extname(file.path) === '.css'\n})\n\n// Program channels to transform the data:\npull(channels.js, minify_js(), channels.js)\npull(channels.css, minify_css(), channels.css)\n\n// Use the transformations:\npull(\n  read('src/**/*'),\n  minify,\n  write('out/')\n)\n```\n\n[`pull-pair`] is to `pull-pair/duplex` as [`pull-splitter`] is to `pull-imux`\n\n## Install\n\n```sh\nnpm install --save pull-imux\n```\n\n```sh\nyarn add pull-imux\n```\n\n## Usage\n\n### `imux(config)`\n\nCreate a `transform` and `channels` stream, also `rest` where unknown data streams to (can be ignored)\n\n`channels` corrosponds with each field from `config` to let you \"route\" your data into different duplexes:\n\n```js\nvar [transform, channels, rest] = imux({\n  high: n =\u003e n \u003e= 50,\n  low:  n =\u003e n \u003c 50\n})\n\n// Setup the channels to transform the data\npull(\n  channels.high,\n  map(n =\u003e n * 2),\n  channels.high\n)\n\n// For no transformations, do an \"echo stream\"\npull(channels.low, channels.low)\n\n// Pull data through the transform\npull(\n  values([ 20, 30, 40, 50, 60, 70 ]),\n  transform,\n  collect((err, values) =\u003e {\n    t.same(values, [ 20, 30, 40, 100, 120, 140 ])\n  })\n)\n```\n\n## Also see\n\n - [`pull-mux`] combine and namespace multiple streams\n - [`pull-splitter`] split streams into other streams using filters\n - [`pull-pair`] for creating linked streams\n\n---\n\nMaintained by [Jamen Marz](https://git.io/jamen) (See on [Twitter](https://twitter.com/jamenmarz) and [GitHub](https://github.com/jamen) for questions \u0026 updates)\n\n[\"inverse multiplexer\" or \"IMUX\"]: https://en.wikipedia.org/wiki/Inverse_multiplexer\n[`pull-stream`]: https://github.com/pull-stream/pull-stream\n[`pull-pair`]: https://github.com/pull-stream/pull-pair\n[`pull-splitter`]: https://github.com/jamen/pull-splitter\n[`pull-mux`]: https://github.com/nichoth/pull-mux\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamen%2Fpull-imux","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjamen%2Fpull-imux","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamen%2Fpull-imux/lists"}