Common Async/Await Design Patterns in Node.js
thecodebarbarian.com
thecodebarbarian.com
It would've been easier if await just accepted arrays just like how generators in co could use yield on arrays to wait on them all.
Also when do you need to use Promise.race?
One example for Promise.race might be a Promise to get data from a cache and another from an HTTP call and you don't care which returns the data, you just want whichever is fastest. Your HTTP call might eventually update your cache and "repaint/recalculate" somehow down the line. That HTTP call still might be "faster" than your cache if the cache hasn't been populated yet and is waiting for data to arrive.