1.0.3 • Published 7 years ago

promise-many v1.0.3

Weekly downloads
11
License
MIT
Repository
github
Last release
7 years ago

promise-many

Given a collection of promises and/or values, defer resolution and rejection until all promises in the collection have resolved or rejected. Finally, resolve or reject with an Array of all values gathered.


Example

    promiseMany([1,2,3, Promise.resolve(4)])
    //    => resolved with [1,2,3,4]

    promiseMany([1,2,3, Promise.reject(4)])
    //    => rejected with [1,2,3,4]

    var rejectedEventually = new Promise(function(_resolve, _reject){
        setTimeout(function(){
            _reject(3);
        }, 200);
    });
    promiseMany([1,2,rejectedEventually, Promise.resolve(4)])
    //    => rejected with [1,2,3,4]
1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

8 years ago

1.0.0

8 years ago