{"id":22382346,"url":"https://github.com/jcoreio/abortable","last_synced_at":"2026-02-25T12:37:41.830Z","repository":{"id":266167311,"uuid":"886982009","full_name":"jcoreio/abortable","owner":"jcoreio","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-03T02:32:00.000Z","size":63,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-01-01T01:38:05.146Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/jcoreio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2024-11-12T00:48:02.000Z","updated_at":"2024-12-03T02:30:53.000Z","dependencies_parsed_at":"2024-12-03T03:01:58.783Z","dependency_job_id":null,"html_url":"https://github.com/jcoreio/abortable","commit_stats":null,"previous_names":["jcoreio/abortable"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcoreio%2Fabortable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcoreio%2Fabortable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcoreio%2Fabortable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcoreio%2Fabortable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jcoreio","download_url":"https://codeload.github.com/jcoreio/abortable/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236608478,"owners_count":19176458,"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-12-05T00:12:36.352Z","updated_at":"2025-10-15T12:30:41.213Z","avatar_url":"https://github.com/jcoreio.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @jcoreio/abortable\n\nmemory-leak-proof function to wrap a promise to reject when a signal is aborted\n\n[![CircleCI](https://circleci.com/gh/jcoreio/abortable.svg?style=svg)](https://circleci.com/gh/jcoreio/abortable)\n[![Coverage Status](https://codecov.io/gh/jcoreio/abortable/branch/master/graph/badge.svg)](https://codecov.io/gh/jcoreio/abortable)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n[![npm version](https://badge.fury.io/js/%40jcoreio%2Fabortable.svg)](https://badge.fury.io/js/%40jcoreio%2Fabortable)\n\n## `abortable(promise, signal)`\n\nCreates a promise that fulfills when the given `promise` fulfills, or rejects when the given `signal` is aborted,\nwhichever comes first. If the signal is aborted, rejects with a `DOMException` with `name: 'AbortError'`.\n\nOnce the returned promise resolves or rejects, references to all promise and signal handlers will have been removed,\nso that it doesn't unexpectedly retain any memory.\n\n```ts\nimport { abortable } from '@jcoreio/abortable'\n\nconst abortController = new AbortContorller()\nconst { signal } = abortController\n\nconst promise = abortable(new Promise((r) =\u003e setTimeout(r, 10000)), signal)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcoreio%2Fabortable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjcoreio%2Fabortable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcoreio%2Fabortable/lists"}