{"id":20369385,"url":"https://github.com/nitzantomer/future.js","last_synced_at":"2026-06-07T19:32:43.803Z","repository":{"id":57131293,"uuid":"67887059","full_name":"nitzantomer/future.js","owner":"nitzantomer","description":"A different way to use promises","archived":false,"fork":false,"pushed_at":"2016-09-11T21:53:18.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-15T07:07:33.358Z","etag":null,"topics":[],"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/nitzantomer.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":"2016-09-10T18:16:35.000Z","updated_at":"2021-12-18T12:46:17.000Z","dependencies_parsed_at":"2022-09-01T00:12:43.863Z","dependency_job_id":null,"html_url":"https://github.com/nitzantomer/future.js","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/nitzantomer%2Ffuture.js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitzantomer%2Ffuture.js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitzantomer%2Ffuture.js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitzantomer%2Ffuture.js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nitzantomer","download_url":"https://codeload.github.com/nitzantomer/future.js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241915181,"owners_count":20041723,"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":[],"created_at":"2024-11-15T00:45:41.404Z","updated_at":"2026-06-07T19:32:42.003Z","avatar_url":"https://github.com/nitzantomer.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# future.js\n\nA simple wrapper for the promise object which can be used when the logic of the async operation should not be implemented \ninside the promise.\n\nA simple example:\n\n```typescript\nclass MyRemoteDataFetcher {\n\tfetch(): Promise\u003cstring\u003e {\n\t\tlet future = new Future\u003cstring\u003e();\n\t\t\n\t\t// make a remote request, when it returns:\n\t\tfuture.resolve(VALUE_FROM_REMOTE);\n\t\t// or if it fails:\n\t\tfuture.reject(MESSAGE);\n\t\t\n\t\treturn future.asPromise();\n\t}\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnitzantomer%2Ffuture.js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnitzantomer%2Ffuture.js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnitzantomer%2Ffuture.js/lists"}