Earlier quoted context omitted.
I agree with you now that "async/await" is available (as I said in my article that I originally linked to). And thank you for providing a second use case to the one I listed in the article - it paid for all the time I wasted on HN today with this thread. ;) The little bit of magic that makes your code sane is the "await" in front of "Promise.all()" and makes it more elegant than the callback version.
>The little bit of magic that makes your code sane is the "await" in front of "Promise.all()" and makes it more elegant than the callback version. I'd actually say that it's the `Promise.all` that makes it sane, the await could be replaced by a `.then` and be functionally the same. Actually it might be even easier to read to someone who doesn't live and breathe javascript as it will keep the program flowing top-to-bo…
And if the individual functions have the custom error logic inside then a simple ".error(callback)" at the end it will just work.