{"id":18605302,"url":"https://github.com/kottans/promise-api-workshop","last_synced_at":"2025-04-10T20:30:59.402Z","repository":{"id":36812296,"uuid":"183747809","full_name":"kottans/promise-api-workshop","owner":"kottans","description":"🧰 DIY Promise static methods","archived":false,"fork":false,"pushed_at":"2023-01-06T01:49:12.000Z","size":1108,"stargazers_count":4,"open_issues_count":6,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-25T03:51:14.761Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/kottans.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-04-27T08:28:13.000Z","updated_at":"2022-05-29T07:42:49.000Z","dependencies_parsed_at":"2023-01-17T05:02:49.090Z","dependency_job_id":null,"html_url":"https://github.com/kottans/promise-api-workshop","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/kottans%2Fpromise-api-workshop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kottans%2Fpromise-api-workshop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kottans%2Fpromise-api-workshop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kottans%2Fpromise-api-workshop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kottans","download_url":"https://codeload.github.com/kottans/promise-api-workshop/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248290019,"owners_count":21078923,"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-07T02:20:48.047Z","updated_at":"2025-04-10T20:30:59.053Z","avatar_url":"https://github.com/kottans.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Promise API workshop\n\nYour task is to implement Promise static methods ([.resolve](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/resolve),\n[.reject](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/reject),\n[.all](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/all),\n[.race](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/race),\n[.allSettled](https://github.com/tc39/proposal-promise-allSettled),\n[.any](https://github.com/tc39/proposal-promise-any))\nfrom scratch via a `Promise` constructor. For this, you will create\na custom class called `CustomPromise`, that will extend the native `Promise`.\n\nOpen `index.js` to begin.\n\n## Requirements\n\n1. Note that after you implement a method, it's allowed to use it in other methods (e.g. `Promise.resolve`).\n\n1. Methods behavior should match the TC39 specification, so pay attention to the requirements described in the comments.\n\n1. Some inputs specify an _iterable_, but for simplicity we'll be accounting for arrays only.\n\n1. Be sure to validate inputs — throw a `TypeError` if the input is invalid!\n\n## Test it!\n\nAfter you're done, check your implementation by running `npm run test` in the console.\n\nIf you'd like to run tests separately for individual methods, try:\n\n```sh\nnpm run test [nameOfTheMethod].js\n```\n\nFor example, to run `CustomPromise.resolve` tests only:\n\n```sh\nnpm run test resolve.js\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkottans%2Fpromise-api-workshop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkottans%2Fpromise-api-workshop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkottans%2Fpromise-api-workshop/lists"}