36 points · by eibrahim · 7y ago · 7 comments
[0] https://dev.to/craigmichaelmartin/the-problem-with-promises-...
`.then()` was fine back in the day, but there's not a good reason to write new code using it in 2019.
await Promise.all([promise, promise]);
Array.prototype.forEachAsyncParallel = async function (iterateFunction) {
await Promise.all(this.map(iterateFunction));
}
Note 1: my app, my prototypes.Note 2: read note 1.