{"id":15979216,"url":"https://github.com/perry-mitchell/abort-controller-multiplexer","last_synced_at":"2026-01-27T00:38:32.265Z","repository":{"id":207130726,"uuid":"718489090","full_name":"perry-mitchell/abort-controller-multiplexer","owner":"perry-mitchell","description":"Combine multiple AbortControllers or AbortSignals into a single instance","archived":false,"fork":false,"pushed_at":"2023-11-14T09:29:57.000Z","size":151,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-02T00:59:57.871Z","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/perry-mitchell.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2023-11-14T07:25:28.000Z","updated_at":"2023-11-14T11:12:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"b2d9df59-085d-4411-a401-8f9ad5c9326d","html_url":"https://github.com/perry-mitchell/abort-controller-multiplexer","commit_stats":null,"previous_names":["perry-mitchell/abort-controller-multiplexer"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/perry-mitchell/abort-controller-multiplexer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perry-mitchell%2Fabort-controller-multiplexer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perry-mitchell%2Fabort-controller-multiplexer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perry-mitchell%2Fabort-controller-multiplexer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perry-mitchell%2Fabort-controller-multiplexer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/perry-mitchell","download_url":"https://codeload.github.com/perry-mitchell/abort-controller-multiplexer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perry-mitchell%2Fabort-controller-multiplexer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28794002,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T21:49:50.245Z","status":"ssl_error","status_checked_at":"2026-01-26T21:48:29.455Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-07T23:41:37.273Z","updated_at":"2026-01-27T00:38:32.250Z","avatar_url":"https://github.com/perry-mitchell.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AbortController Multiplexer\n\u003e Combine multiple AbortControllers or AbortSignals into a single instance\n\n[![abort-controller-multiplexer](https://img.shields.io/npm/v/abort-controller-multiplexer?color=blue\u0026label=abort-controller-multiplexer\u0026logo=npm\u0026style=flat-square)](https://www.npmjs.com/package/abort-controller-multiplexer) ![Tests status](https://github.com/perry-mitchell/abort-controller-multiplexer/actions/workflows/test.yml/badge.svg) ![GitHub](https://img.shields.io/github/license/perry-mitchell/abort-controller-multiplexer)\n\n`AbortController`s are very useful mechanisms in JavaScript that allow one to _insert_ abort signals into application components with ease. You can pass an `AbortController`'s `signal` (`AbortSignal`) into methods you call, abort it later, and use it to:\n\n * Cancel asynchronous operations\n   * Cancel requests\n * Throw if the signal was previously aborted\n * _Etc._\n\nSometimes, in sufficiently complicated applications, you may run across situations where you need multiple abort signals. This library can be used to **group them together** into one large signal/controller, that you can abort from a single method or watch using a single signal.\n\n## Installation\n\nInstall using npm:\n\n```shell\nnpm install abort-controller-multiplexer --save\n```\n\n_Note that this library uses ESM. You must consume it in an ESM-friendly environment._\n\n## Usage\n\nCombine several abort controllers:\n\n```typescript\nimport { combineControllers } from \"abort-controller-multiplexer\";\n\nconst ac1 = new AbortController();\nconst ac2 = new AbortController();\nconst controller = combineControllers(ac1, ac2);\n\ncontroller.abort();\n```\n\n_Note that `combineControllers` calls `combineSignals` under the hood._\n\nCombine several signals:\n\n```typescript\nimport { combineSignals } from \"abort-controller-multiplexer\";\n\nconst ac1 = new AbortController();\nconst ac2 = new AbortController();\nconst signal = combineSignals(ac1.signal, ac2.signal);\n\nac1.abort();\n\nsignal.throwIfAborted(); // Throws\n```\n\nNote that these combination methods _do not_ modify the underlying `AbortController` and `AbortSignal` instances.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperry-mitchell%2Fabort-controller-multiplexer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperry-mitchell%2Fabort-controller-multiplexer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperry-mitchell%2Fabort-controller-multiplexer/lists"}