Take an array of promises, and return a promise that fulfills with the value of the first left-most fulfilled promise in the array, or rejects with reason of first rejected promise if all promises are rejected.
Installation
npm install promise-any-first
Example
varPromise=require('promise-now');
var anyFirst =require('promise-any-first')
var p1 =newPromise();
var p2 =newPromise();
var p3 =newPromise();
var promise =anyFirst([p1, p2, p3]).then(function(value){