{"id":19729707,"url":"https://github.com/vasanthk/simple-promise-library","last_synced_at":"2025-04-30T01:32:17.724Z","repository":{"id":82288276,"uuid":"38798733","full_name":"vasanthk/simple-promise-library","owner":"vasanthk","description":"A simple implementation of a promise library","archived":false,"fork":false,"pushed_at":"2016-02-17T17:09:28.000Z","size":6,"stargazers_count":13,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-03-15T19:10:04.955Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/vasanthk.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":"2015-07-09T05:17:50.000Z","updated_at":"2019-07-15T22:53:14.000Z","dependencies_parsed_at":"2023-05-03T10:47:34.154Z","dependency_job_id":null,"html_url":"https://github.com/vasanthk/simple-promise-library","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/vasanthk%2Fsimple-promise-library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vasanthk%2Fsimple-promise-library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vasanthk%2Fsimple-promise-library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vasanthk%2Fsimple-promise-library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vasanthk","download_url":"https://codeload.github.com/vasanthk/simple-promise-library/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224193053,"owners_count":17271238,"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-12T00:13:22.177Z","updated_at":"2024-11-12T00:13:22.572Z","avatar_url":"https://github.com/vasanthk.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple promise library\nA simple implementation of a promise library.\n\nThis is from promises explained by Axel Rauschmayer in his article [here](http://www.2ality.com/2014/10/es6-promises-api.html)\nCredit for [diagram](http://www.2ality.com/2014/10/es6-promises-api.html) and [demo code](https://github.com/rauschma/demo_promise) goes to him.\n\n### Promise: Stand-alone\n![Promise: Stand-alone](http://1.bp.blogspot.com/-YtdGXGH__gk/VDEiTAXcqtI/AAAAAAAAA3s/3IwMMkVJSps/s1600/promise1_simple.jpg)\n\n### Promise: Chaining\n![Promise: Chaining](http://2.bp.blogspot.com/-pZ2agjPL54Y/VDEiTUClecI/AAAAAAAAA30/3zAmth5qnrE/s1600/promise2_chaining.jpg)\n\n### Promise: Chaining + Flattened\n![Promise: Chaining + Flattened](http://2.bp.blogspot.com/-yuykRwpwHFw/VDEiT1k2s9I/AAAAAAAAA34/AN8IZI5uoGw/s1600/promise3_flattening.jpg)\n\n### Promise: Chaining + Flattened\n![Promise: Chaining + Flattened + Exceptions](http://2.bp.blogspot.com/-x6hBT5B_yw4/VDEiULOJwII/AAAAAAAAA4E/aUTml-VNKRk/s1600/promise4_exceptions.jpg)\n\nIf we wanted to turn this into an actual promise implementation, we’d still need to implement the [revealing constructor pattern](https://blog.domenic.me/the-revealing-constructor-pattern/):\n\nES6 promises are not resolved and rejected via methods, but via functions that are handed to the executor, the callback parameter of the constructor.\n\n#### Reference Links: \nhttps://promisesaplus.com/\n\nhttp://www.2ality.com/2014/10/es6-promises-api.html\n\nhttp://www.html5rocks.com/en/tutorials/es6/promises/\n\nhttps://www.promisejs.org/patterns/\n\nhttp://www.html5rocks.com/en/tutorials/developertools/async-call-stack/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvasanthk%2Fsimple-promise-library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvasanthk%2Fsimple-promise-library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvasanthk%2Fsimple-promise-library/lists"}