{"id":16255270,"url":"https://github.com/rpgeeganage/alls","last_synced_at":"2025-03-19T21:30:38.830Z","repository":{"id":47053292,"uuid":"163577819","full_name":"rpgeeganage/alls","owner":"rpgeeganage","description":"Just another library with the sole purpose of waiting till all promises to complete. Nothing more, Nothing less.","archived":false,"fork":false,"pushed_at":"2022-07-20T03:52:38.000Z","size":197,"stargazers_count":13,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-28T23:21:12.255Z","etag":null,"topics":["allsettled","library","promise","promise-library","promise-series","promises","promises-complete","small-projects","tiny-library","typescript","typescript-library"],"latest_commit_sha":null,"homepage":"https://rpgeeganage.github.io/alls","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/rpgeeganage.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":"2018-12-30T10:05:03.000Z","updated_at":"2023-04-06T18:45:32.000Z","dependencies_parsed_at":"2022-08-23T17:40:12.272Z","dependency_job_id":null,"html_url":"https://github.com/rpgeeganage/alls","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/rpgeeganage%2Falls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rpgeeganage%2Falls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rpgeeganage%2Falls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rpgeeganage%2Falls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rpgeeganage","download_url":"https://codeload.github.com/rpgeeganage/alls/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244056406,"owners_count":20390719,"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","library","promise","promise-library","promise-series","promises","promises-complete","small-projects","tiny-library","typescript","typescript-library"],"created_at":"2024-10-10T15:29:12.713Z","updated_at":"2025-03-19T21:30:38.361Z","avatar_url":"https://github.com/rpgeeganage.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# alls (All Settled) - wait till all the promises settled\n[![License](https://img.shields.io/github/license/rpgeeganage/alls.svg)](https://github.com/rpgeeganage/alls)\n[![Version](https://img.shields.io/npm/v/alls.svg)](https://img.shields.io/npm/v/alls.svg)\n[![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/rpgeeganage/alls.svg?logo=lgtm\u0026logoWidth=18)](https://lgtm.com/projects/g/rpgeeganage/alls/context:javascript)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/e8fc6d45ba07412a975fb823379cdbdf)](https://www.codacy.com/app/rpgeeganage/alls?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=rpgeeganage/alls\u0026amp;utm_campaign=Badge_Grade)\n[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/e8fc6d45ba07412a975fb823379cdbdf)](https://www.codacy.com/app/rpgeeganage/alls?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=rpgeeganage/alls\u0026utm_campaign=Badge_Coverage)\n[![Build Status](https://travis-ci.org/rpgeeganage/alls.svg?branch=master)](https://travis-ci.org/rpgeeganage/alls)\n[![Known Vulnerabilities](https://snyk.io/test/github/rpgeeganage/alls/badge.svg?targetFile=package.json)](https://snyk.io/test/github/rpgeeganage/alls?targetFile=package.json)\n[![Maintainability](https://api.codeclimate.com/v1/badges/66cd49a28da26d6f51f1/maintainability)](https://codeclimate.com/github/rpgeeganage/alls/maintainability)\n### Just another library with the sole purpose of waiting till all promises to complete. Nothing more, Nothing less.\n\n#### (Since, The [```Promise.all()```](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/all) method returns a single Promise that resolves when all of the promises passed as an iterable have resolved or when the iterable contains no promises. It rejects with the reason of the first promise that rejects.)\n\n### TypeScript Doc: [https://rpgeeganage.github.io/alls/doc/](https://rpgeeganage.github.io/alls/doc/)\n\n### Basic Usage:\n```js\nconst { alls } = require('alls');\n\nconst results = await alls([promise1, promise2, .....promiseN]);\n// structure of results\n[\n  {\n    status: 'fulfilled',\n    value: promise1-value\n  },\n  {\n    status: 'rejected',\n    reason: error-from-promise2\n  }\n...\n  {\n    status: 'fulfilled',\n    value: promiseN-value\n  }\n]\n```\n\n#### Return value for ```Resolve```\n```js\n{\n    status: 'fulfilled',\n    value: \u003cpromise return value\u003e\n}\n```\n\n#### Return value for ```Reject```\n```js\n{\n    status: 'rejected',\n    reason: \u003cError thrown by promise\u003e\n}\n```\n\n### final output\n\n```js\nconst error1 = new Error('error 1');\nconst error2 = new Error('error 2');\nconst error3 = new Error('error 3');\n\nconst results = await alls([\n  Promise.resolve(1),\n  Promise.reject(error1),\n  Promise.resolve(2),\n  Promise.reject(error2),\n  Promise.resolve(3),\n  Promise.reject(error3)\n]);\n\n/**\n* content of the 'result'\n*/\n[\n  { state: 'fulfilled', value: 1 },\n  { state: 'rejected', reason: error1 },\n  { state: 'fulfilled', value: 2 },\n  { state: 'rejected', reason: error2 },\n  { state: 'fulfilled', value: 3 },\n  { state: 'rejected', reason: error3 }\n]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frpgeeganage%2Falls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frpgeeganage%2Falls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frpgeeganage%2Falls/lists"}