Explanation | Checking if all promises fail?
I'm reading Service Worker Offline Cookbook. Following is a piece of code, that checks if all promises have rejected — /* inside a promise */ /* reject if all promises reject */ promises.reduce((a, b) => a.catch(() => b)) .catch(() => reject(...
Mar 12, 2019C