https://github.com/odedniv/node-promises-fulfilled
Given an array of promises, returns a promise that is resolved/rejected once ALL of the promises are fulfilled.
https://github.com/odedniv/node-promises-fulfilled
Last synced: 5 months ago
JSON representation
Given an array of promises, returns a promise that is resolved/rejected once ALL of the promises are fulfilled.
- Host: GitHub
- URL: https://github.com/odedniv/node-promises-fulfilled
- Owner: odedniv
- Created: 2018-03-26T12:47:05.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-26T17:41:06.000Z (about 8 years ago)
- Last Synced: 2025-12-04T06:17:24.658Z (7 months ago)
- Language: JavaScript
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# promises-fulfilled
[](https://travis-ci.org/odedniv/node-promises-fulfilled)
Given an array of promises, returns a promise that is resolved/rejected once *ALL* of the promises are fulfilled.
* If all promises are resolved, the returned promise is resolved with an array of all the results in the order of the given promises.
* If even one promise rejects, the returned promise is rejected with the error of the first rejected promise, but only after *ALL* promises have been fulfilled.
## Install
```bash
npm install --save promises-fulfilled
```
## Usage
```javascript
const fulfilled = require('promises-fulfilled');
fulfilled([p1, p2, p3])
.then(...)
.catch(...);
```
## License
MIT