I have a Promise.all(promiseArr).then(()=>foo())
that I want to do foo()
even if some percentage of the promises in promiseArr
rejected.
It's a little ugly to do:
Promise.all(promiseArr).then(()=>foo())
.catch(()=>{/*check percentage of rejected promises and if it's good call foo()*/});
Is there a better way?