Skip to content

About

Promise.any() implementation

Resources

Stars

41 stars

Watchers

4 watching

Forks

Latest commit

Β 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

promise-any

Codeship Status for m0ppers/promise-any

ES6 promises don't provide any(). A small library to implement them. Will convert arguments to promises if not already a promise.

var promiseAny = require('promise-any');

promiseAny([
    Promise.reject('βœ—'),
    Promise.resolve('βœ“'),
]).then(function(value) {
    // value is 'βœ“' :)
});

promiseAny([
    Promise.reject('βœ—'),
    Promise.reject('βœ—'),
]).catch(function(reasons) {
    // reasons is ['βœ—', 'βœ—'] :(
});

About

Promise.any() implementation

Resources

Stars

41 stars

Watchers

4 watching

Forks

Releases

Packages

Used by

Contributors

Languages