{"id":21305005,"url":"https://github.com/maximilianmairinger/resablepromise","last_synced_at":"2025-03-15T19:26:40.489Z","repository":{"id":97155592,"uuid":"608582449","full_name":"maximilianMairinger/resablePromise","owner":"maximilianMairinger","description":"Simple promise subclass, allowing for resolvement outside of callback (as property).","archived":false,"fork":false,"pushed_at":"2023-10-22T22:47:19.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-22T08:42:46.997Z","etag":null,"topics":["able","promise","resable","resolve","utility"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/resable-promise","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maximilianMairinger.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-03-02T10:14:07.000Z","updated_at":"2023-03-02T10:14:19.000Z","dependencies_parsed_at":"2025-01-22T08:42:29.330Z","dependency_job_id":"c92d2bf7-222f-4b7d-b763-397e0c99037e","html_url":"https://github.com/maximilianMairinger/resablePromise","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maximilianMairinger%2FresablePromise","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maximilianMairinger%2FresablePromise/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maximilianMairinger%2FresablePromise/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maximilianMairinger%2FresablePromise/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maximilianMairinger","download_url":"https://codeload.github.com/maximilianMairinger/resablePromise/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243779641,"owners_count":20346750,"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":["able","promise","resable","resolve","utility"],"created_at":"2024-11-21T16:16:36.751Z","updated_at":"2025-03-15T19:26:40.480Z","avatar_url":"https://github.com/maximilianMairinger.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DEPRECATED\r\n\r\nUse analog implementation in [more-proms](https://npmjs.com/package/more-proms) instead.\r\n\r\n\r\n# Resable promise\r\n\r\nSimple promise subclass, allowing for resolvent outside of callback (as property).\r\n\r\n## Installation\r\n\r\n```shell\r\n $ npm i resable-promise\r\n```\r\n\r\n## Usage\r\n\r\nDo this:\r\n\r\n```ts\r\nimport ResablePromise from \"resable-promise\"\r\n\r\nconst prom = new ResablePromise()\r\n// later...\r\nprom.res()\r\n```\r\n\r\nSo you dont have to do this:\r\n\r\n```ts\r\nlet promRes\r\nconst prom = new Promise(res =\u003e promRes = res)\r\n// later ...\r\npromRes()\r\n```\r\n\r\nOnly convenience, as I see myself doing this a lot. And this provides type safety without effort.\r\n\r\n### On Settled\r\n\r\nIs a promise that resolves when the base promise is ether resolved or rejected.\r\n\r\n```ts\r\nconst prom = new ResablePromise()\r\n\r\nprom.settled.then(() =\u003e console.log(\"settled\"))\r\n```\r\n\r\n\r\n## Contribute\r\n\r\nAll feedback is appreciated. Create a pull request or write an issue.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaximilianmairinger%2Fresablepromise","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaximilianmairinger%2Fresablepromise","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaximilianmairinger%2Fresablepromise/lists"}