
Common Async/Await Design Patterns in Node.js - vkarpov207
http://thecodebarbarian.com/common-async-await-design-patterns-in-node.js.html
======
h1d
I wonder why Promise.all is not a language construct but a regular method call
bringing Promise object out of nowhere.

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?

~~~
merkaloid
await does "accept" arrays, it resolves to the array you pass it

~~~
h1d
It's just returning it as is right?

~~~
WorldMaker
You can't await something that isn't a promise like an array. You should get a
TypeError.

