{"id":24298058,"url":"https://github.com/sevenwestmedia-labs/promise-completion-source","last_synced_at":"2025-03-06T09:44:06.486Z","repository":{"id":44117083,"uuid":"163713170","full_name":"sevenwestmedia-labs/promise-completion-source","owner":"sevenwestmedia-labs","description":"Creates a promise producer which controls the completion/rejection of the promise available through the .promise key.","archived":false,"fork":false,"pushed_at":"2023-01-04T02:13:55.000Z","size":2093,"stargazers_count":2,"open_issues_count":19,"forks_count":0,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-01-16T20:57:50.319Z","etag":null,"topics":["promise"],"latest_commit_sha":null,"homepage":"","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/sevenwestmedia-labs.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}},"created_at":"2019-01-01T04:33:24.000Z","updated_at":"2023-08-03T11:49:16.000Z","dependencies_parsed_at":"2023-02-01T17:45:26.905Z","dependency_job_id":null,"html_url":"https://github.com/sevenwestmedia-labs/promise-completion-source","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sevenwestmedia-labs%2Fpromise-completion-source","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sevenwestmedia-labs%2Fpromise-completion-source/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sevenwestmedia-labs%2Fpromise-completion-source/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sevenwestmedia-labs%2Fpromise-completion-source/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sevenwestmedia-labs","download_url":"https://codeload.github.com/sevenwestmedia-labs/promise-completion-source/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242186735,"owners_count":20086211,"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":["promise"],"created_at":"2025-01-16T20:53:46.812Z","updated_at":"2025-03-06T09:44:06.461Z","avatar_url":"https://github.com/sevenwestmedia-labs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Promise completion source\n\n[![Build Status](https://travis-ci.com/sevenwestmedia-labs/promise-completion-source.svg?branch=master)](https://travis-ci.com/sevenwestmedia-labs/promise-completion-source)\n[![NPM Package](https://img.shields.io/npm/v/promise-completion-source.svg)](https://www.npmjs.com/package/promise-completion-source) [![Greenkeeper badge](https://badges.greenkeeper.io/sevenwestmedia-labs/promise-completion-source.svg)](https://greenkeeper.io/)\n\nCreates a promise producer which controls the completion/rejection of the promise available through the .promise key.\n\n## Example\n\n```ts\nimport { PromiseCompletionSource } from 'promise-completion-source'\n\nconst promiseCompletionSource = new PromiseCompletionSource\u003cResult\u003e()\n\n// This is a promise which can be awaited or passed around as a future\nconst promise = promiseCompletionSource.promise\n\n// Then you can resolve/reject using the completion source\npromiseCompletionSource.resolve(result)\n// or\npromiseCompletionSource.reject(new Error('Some error'))\n\n// You can also check completion\nconst isPromiseCompleted = promiseCompletionSource.completed\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsevenwestmedia-labs%2Fpromise-completion-source","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsevenwestmedia-labs%2Fpromise-completion-source","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsevenwestmedia-labs%2Fpromise-completion-source/lists"}