{"id":18402084,"url":"https://github.com/khrj/p-timeout","last_synced_at":"2025-12-11T21:13:52.596Z","repository":{"id":51169881,"uuid":"337054043","full_name":"khrj/p-timeout","owner":"khrj","description":"Timeout a promise after a specified amount of time","archived":false,"fork":false,"pushed_at":"2022-11-02T10:59:47.000Z","size":225,"stargazers_count":5,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-28T12:15:55.387Z","etag":null,"topics":["deno","module","port","promise","timeout","typescript"],"latest_commit_sha":null,"homepage":"https://deno.land/x/p_timeout","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/khrj.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}},"created_at":"2021-02-08T11:29:40.000Z","updated_at":"2022-04-01T17:49:15.000Z","dependencies_parsed_at":"2023-01-21T04:19:45.884Z","dependency_job_id":null,"html_url":"https://github.com/khrj/p-timeout","commit_stats":null,"previous_names":["khushrajrathod/ptimeout"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khrj%2Fp-timeout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khrj%2Fp-timeout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khrj%2Fp-timeout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khrj%2Fp-timeout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/khrj","download_url":"https://codeload.github.com/khrj/p-timeout/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223274984,"owners_count":17118095,"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":["deno","module","port","promise","timeout","typescript"],"created_at":"2024-11-06T02:41:05.637Z","updated_at":"2025-12-11T21:13:47.526Z","avatar_url":"https://github.com/khrj.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"assets/logo.svg\" width=\"350\" height=\"350\" alt=\"People standing in Timeout illustration\"\u003e\n    \u003ch1\u003ePromise Timeout\u003c/h1\u003e\n    \u003cp\u003e\n        \u003cb\u003eTimeout a promise after a specified amount of time. Deno port of \u003ca href=\"https://github.com/sindresorhus/p-timeout\"\u003esindresorhus's p-timeout for node\u003c/a\u003e\u003c/b\u003e\n    \u003c/p\u003e\n    \u003cp\u003e\n        \u003cimg alt=\"build status\" src=\"https://img.shields.io/github/workflow/status/khrj/p-timeout/Deno?label=checks\" \u003e\n        \u003cimg alt=\"language\" src=\"https://img.shields.io/github/languages/top/khrj/p-timeout\" \u003e\n        \u003cimg alt=\"code size\" src=\"https://img.shields.io/github/languages/code-size/khrj/p-timeout\"\u003e\n        \u003cimg alt=\"issues\" src=\"https://img.shields.io/github/issues/khrj/p-timeout\" \u003e\n        \u003cimg alt=\"license\" src=\"https://img.shields.io/github/license/khrj/p-timeout\"\u003e\n        \u003cimg alt=\"version\" src=\"https://img.shields.io/github/v/release/khrj/p-timeout\"\u003e\n    \u003c/p\u003e\n    \u003cp\u003e\n        \u003cb\u003e\u003ca href=\"https://deno.land/x/p_timeout\"\u003eView on deno.land\u003c/a\u003e\u003c/b\u003e\n    \u003c/p\u003e\n    \u003cbr\u003e\n    \u003cbr\u003e\n    \u003cbr\u003e\n\u003c/div\u003e\n\n## Usage\n\n```js\nimport pTimeout from \"https://deno.land/x/p_timeout@1.0.2/mod.ts\"\n\nconst delayedPromise = new Promise(resolve =\u003e setTimeout(resolve, 500))\n\nawait pTimeout({\n    promise: delayedPromise,\n    milliseconds: 50,\n})\n\n// =\u003e [TimeoutError: Promise timed out after 50 milliseconds]\n```\n\n## API\n\nSee https://doc.deno.land/https/deno.land/x/p_timeout@1.0.2/mod.ts\n\n## Supporters\n\n- HUGE thanks to @sindresorhus -- this repository is mostly his code, modified to work with Deno\n\n[![Stargazers repo roster for @khrj/p-timeout](https://reporoster.com/stars/khrj/p-timeout)](https://github.com/khrj/p-timeout/stargazers)\n\n[![Forkers repo roster for @khrj/p-timeout](https://reporoster.com/forks/khrj/p-timeout)](https://github.com/khrj/p-timeout/network/members)\n\n## Related\n\n- [p-queue](https://github.com/khrj/p-queue)\n- [p-retried](https://github.com/khrj/p-retried)\n- [retried](https://github.com/khrj/retried)\n- [...more](https://github.com/khrj/deno-modules)\n\n## License\n\n- Promise Timeout is licensed under the MIT license.\n- Code is adapted from [Sindre's p-timeout for node](https://github.com/sindresorhus/p-timeout) (also under the MIT license)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhrj%2Fp-timeout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkhrj%2Fp-timeout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhrj%2Fp-timeout/lists"}