{"id":20192375,"url":"https://github.com/rocicorp/resolver","last_synced_at":"2025-08-07T22:51:15.722Z","repository":{"id":43099509,"uuid":"471009919","full_name":"rocicorp/resolver","owner":"rocicorp","description":"A simple promise resolver","archived":false,"fork":false,"pushed_at":"2024-12-09T22:25:50.000Z","size":154,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-07-19T14:00:49.539Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://npmjs.com/package/@rocicorp/resolver","language":"TypeScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rocicorp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2022-03-17T13:38:06.000Z","updated_at":"2024-12-19T00:35:19.000Z","dependencies_parsed_at":"2024-06-03T15:07:15.575Z","dependency_job_id":"5f651db1-fd59-4e41-962c-2a25dd5aeb59","html_url":"https://github.com/rocicorp/resolver","commit_stats":{"total_commits":3,"total_committers":1,"mean_commits":3.0,"dds":0.0,"last_synced_commit":"46b417715025bbb9f310680c2cc348124edf671f"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/rocicorp/resolver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rocicorp%2Fresolver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rocicorp%2Fresolver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rocicorp%2Fresolver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rocicorp%2Fresolver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rocicorp","download_url":"https://codeload.github.com/rocicorp/resolver/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rocicorp%2Fresolver/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269337968,"owners_count":24400175,"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","status":"online","status_checked_at":"2025-08-07T02:00:09.698Z","response_time":73,"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":[],"created_at":"2024-11-14T04:00:53.039Z","updated_at":"2025-08-07T22:51:15.609Z","avatar_url":"https://github.com/rocicorp.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Resolver\n\nProvides a simple `Promise` resolver\n\n# Installation\n\n```\nnpm install @rocicorp/resolver\n```\n\n# Usage\n\n`resolver` returns a triplet of `promise`, `resolve` and `reject` functions.\n\n```ts\nimport {resolver} from '@rocicorp/resolver';\n\nconst {promise, resolve} = resolver\u003cnumber\u003e();\nresolve(42);\nawait promise; // 42\n```\n\n`reject` can be used to reject the promise.\n\n```ts\nimport {resolver} from '@rocicorp/resolver';\n\nconst {promise, resolve, reject} = resolver\u003cnumber, string\u003e();\nreject('fail');\ntry {\n  await promise;\n  // unreachable\n} catch (e) {\n  assert(e === 'fail');\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frocicorp%2Fresolver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frocicorp%2Fresolver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frocicorp%2Fresolver/lists"}