Skip to content

m0ppers/promise-any

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

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

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •