{"id":18402085,"url":"https://github.com/khrj/p-retried","last_synced_at":"2026-01-18T10:00:34.287Z","repository":{"id":51169906,"uuid":"336837963","full_name":"khrj/p-retried","owner":"khrj","description":"Retry a promise-returning or async function. Abstraction for exponential and custom retry strategies for failed operations","archived":false,"fork":false,"pushed_at":"2021-07-12T11:25:26.000Z","size":39,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-14T05:42:19.075Z","etag":null,"topics":["abstraction","async","deno","exponential-backoff","function","port","promise","promise-await","retry"],"latest_commit_sha":null,"homepage":"https://deno.land/x/p_retried","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-07T16:49:30.000Z","updated_at":"2021-10-04T14:52:03.000Z","dependencies_parsed_at":"2022-09-03T15:22:02.447Z","dependency_job_id":null,"html_url":"https://github.com/khrj/p-retried","commit_stats":null,"previous_names":["khushrajrathod/pretried"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/khrj/p-retried","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khrj%2Fp-retried","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khrj%2Fp-retried/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khrj%2Fp-retried/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khrj%2Fp-retried/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/khrj","download_url":"https://codeload.github.com/khrj/p-retried/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khrj%2Fp-retried/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28531362,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["abstraction","async","deno","exponential-backoff","function","port","promise","promise-await","retry"],"created_at":"2024-11-06T02:41:06.018Z","updated_at":"2026-01-18T10:00:34.221Z","avatar_url":"https://github.com/khrj.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"assets/logo.svg\" width=\"700\" height=\"500\" alt=\"Retry Icon\"\u003e\n    \u003ch1\u003ePromise Retried\u003c/h1\u003e\n    \u003cp\u003e\n        \u003cb\u003eRetry a promise-returning or async function. Deno port of \u003ca href=\"https://github.com/sindresorhus/p-retry\"\u003esindresorhus's p-retry 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-retried/Deno?label=checks\" \u003e\n        \u003cimg alt=\"language\" src=\"https://img.shields.io/github/languages/top/khrj/p-retried\" \u003e\n        \u003cimg alt=\"code size\" src=\"https://img.shields.io/github/languages/code-size/khrj/p-retried\"\u003e\n        \u003cimg alt=\"issues\" src=\"https://img.shields.io/github/issues/khrj/p-retried\" \u003e\n        \u003cimg alt=\"license\" src=\"https://img.shields.io/github/license/khrj/p-retried\"\u003e\n        \u003cimg alt=\"version\" src=\"https://img.shields.io/github/v/release/khrj/p-retried\"\u003e\n    \u003c/p\u003e\n    \u003cp\u003e\n        \u003cb\u003e\u003ca href=\"https://deno.land/x/p_retried\"\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\nAbstraction for exponential and custom retry strategies for failed operations\n\n## Usage\n\n```ts\nimport pRetried, {\n    AbortError,\n} from \"https://deno.land/x/p_retried@1.0.7/mod.ts\"\n\nasync function run() {\n    const response = await fetch(\"https://sindresorhus.com/unicorn\")\n\n    // Abort retrying if the resource doesn't exist\n    if (response.status === 404) {\n        throw new AbortError(response.statusText)\n    }\n\n    return response.blob()\n}\n\nconsole.log(await pRetried(run, { retries: 5 }))\n```\n\n## API\n\nSee https://doc.deno.land/https/deno.land/x/p_retried@1.0.7/mod.ts\n\n## Tip\n\nYou can pass arguments to the function being retried by wrapping it in an inline arrow function:\n\n```js\nimport pRetried from \"https://deno.land/x/p_retried@1.0.7/mod.ts\"\n\nconst run = async emoji =\u003e {\n    // …\n}\n\n// Without arguments\nawait pRetried(run, {\n    retries: 5,\n})\n\n// With arguments\nawait pRetried(() =\u003e run(\"🦄\"), {\n    retries: 5,\n})\n```\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-retried](https://reporoster.com/stars/khrj/p-retried)](https://github.com/khrj/p-retried/stargazers)\n\n[![Forkers repo roster for @khrj/p-retried](https://reporoster.com/forks/khrj/p-retried)](https://github.com/khrj/p-retried/network/members)\n\n## Related\n\n- [p-timeout](https://github.com/khrj/p-timeout)\n- [p-queue](https://github.com/khrj/p-queue)\n- [retried](https://github.com/khrj/retried)\n- [...more](https://github.com/khrj/deno-modules)\n\n## License\n\n- Promise Retried is licensed under the MIT license.\n- Code is adapted from [Sindre's p-retry for node](https://github.com/sindresorhus/p-retry) (also under the MIT license)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhrj%2Fp-retried","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkhrj%2Fp-retried","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhrj%2Fp-retried/lists"}