Let\'s say I have a set of Promises that are making network requests, of which one will fail:
Promise
// http://does-not-exist will throw a TypeError va
This should be consistent with how Q does it:
if(!Promise.allSettled) { Promise.allSettled = function (promises) { return Promise.all(promises.map(p => Promise.resolve(p).then(v => ({ state: 'fulfilled', value: v, }), r => ({ state: 'rejected', reason: r, })))); }; }