{"id":26608087,"url":"https://github.com/es-shims/promise.allsettled","last_synced_at":"2025-04-07T05:07:55.834Z","repository":{"id":54928391,"uuid":"177898459","full_name":"es-shims/Promise.allSettled","owner":"es-shims","description":"ES Proposal spec-compliant shim for Promise.allSettled","archived":false,"fork":false,"pushed_at":"2023-09-03T19:34:09.000Z","size":92,"stargazers_count":96,"open_issues_count":0,"forks_count":9,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-05-09T09:56:57.871Z","etag":null,"topics":["allsettled","await","ecmascript","es-shim","javascript","polyfill","promise","shim"],"latest_commit_sha":null,"homepage":"https://github.com/tc39/proposal-promise-allSettled","language":"JavaScript","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/es-shims.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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},"funding":{"github":["ljharb"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":"npm/es5-shim","community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2019-03-27T01:48:26.000Z","updated_at":"2024-06-18T12:43:10.935Z","dependencies_parsed_at":"2024-06-18T12:43:08.164Z","dependency_job_id":"d3206c94-521e-4d14-add2-4e5b219f54b4","html_url":"https://github.com/es-shims/Promise.allSettled","commit_stats":{"total_commits":67,"total_committers":1,"mean_commits":67.0,"dds":0.0,"last_synced_commit":"d857dcc2ffc3de617b625c46fa4c0701126961cb"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/es-shims%2FPromise.allSettled","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/es-shims%2FPromise.allSettled/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/es-shims%2FPromise.allSettled/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/es-shims%2FPromise.allSettled/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/es-shims","download_url":"https://codeload.github.com/es-shims/Promise.allSettled/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247595334,"owners_count":20963943,"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":["allsettled","await","ecmascript","es-shim","javascript","polyfill","promise","shim"],"created_at":"2025-03-23T23:32:03.584Z","updated_at":"2025-04-07T05:07:55.809Z","avatar_url":"https://github.com/es-shims.png","language":"JavaScript","funding_links":["https://github.com/sponsors/ljharb","https://tidelift.com/funding/github/npm/es5-shim"],"categories":[],"sub_categories":[],"readme":"# promise.allsettled \u003csup\u003e[![Version Badge][npm-version-svg]][package-url]\u003c/sup\u003e\n\n[![github actions][actions-image]][actions-url]\n[![coverage][codecov-image]][codecov-url]\n[![dependency status][deps-svg]][deps-url]\n[![dev dependency status][dev-deps-svg]][dev-deps-url]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n\n[![npm badge][npm-badge-png]][package-url]\n\nES Proposal spec-compliant shim for Promise.allSettled. Invoke its \"shim\" method to shim `Promise.allSettled` if it is unavailable or noncompliant. **Note**: a global `Promise` must already exist: the [es6-shim](https://github.com/es-shims/es6-shim) is recommended.\n\nThis package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment that has `Promise` available globally, and complies with the [proposed spec](https://github.com/tc39/proposal-promise-allSettled).\n\nMost common usage:\n```js\nvar assert = require('assert');\nvar allSettled = require('promise.allsettled');\n\nvar resolved = Promise.resolve(42);\nvar rejected = Promise.reject(-1);\n\nallSettled([resolved, rejected]).then(function (results) {\n\tassert.deepEqual(results, [\n\t\t{ status: 'fulfilled', value: 42 },\n\t\t{ status: 'rejected', reason: -1 }\n\t]);\n});\n\nallSettled.shim(); // will be a no-op if not needed\n\nPromise.allSettled([resolved, rejected]).then(function (results) {\n\tassert.deepEqual(results, [\n\t\t{ status: 'fulfilled', value: 42 },\n\t\t{ status: 'rejected', reason: -1 }\n\t]);\n});\n```\n\n## Tests\nSimply clone the repo, `npm install`, and run `npm test`\n\n[package-url]: https://npmjs.com/package/promise.allsettled\n[npm-version-svg]: http://versionbadg.es/es-shims/Promise.allSettled.svg\n[travis-svg]: https://travis-ci.org/es-shims/Promise.allSettled.svg\n[travis-url]: https://travis-ci.org/es-shims/Promise.allSettled\n[deps-svg]: https://david-dm.org/es-shims/Promise.allSettled.svg\n[deps-url]: https://david-dm.org/es-shims/Promise.allSettled\n[dev-deps-svg]: https://david-dm.org/es-shims/Promise.allSettled/dev-status.svg\n[dev-deps-url]: https://david-dm.org/es-shims/Promise.allSettled#info=devDependencies\n[npm-badge-png]: https://nodei.co/npm/promise.allsettled.png?downloads=true\u0026stars=true\n[license-image]: http://img.shields.io/npm/l/promise.allsettled.svg\n[license-url]: LICENSE\n[downloads-image]: http://img.shields.io/npm/dm/promise.allsettled.svg\n[downloads-url]: http://npm-stat.com/charts.html?package=promise.allsettled\n[codecov-image]: https://codecov.io/gh/es-shims/Promise.allSettled/branch/main/graphs/badge.svg\n[codecov-url]: https://app.codecov.io/gh/es-shims/Promise.allSettled/\n[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/Promise.allSettled\n[actions-url]: https://github.com/es-shims/Promise.allSettled/actions\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fes-shims%2Fpromise.allsettled","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fes-shims%2Fpromise.allsettled","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fes-shims%2Fpromise.allsettled/lists"}