TLDR: Use for...of
instead of forEach()
in asynchronous code.
For legacy browsers, use for...i
or [].reduce()
To execute the promises in parallel, use Promise.all([].map(...))
YAML 34 mins ███████████▎░░░░░░░░░ 54.1% | |
Bash 26 mins ████████▌░░░░░░░░░░░░ 41.0% | |
Makefile 2 mins ▊░░░░░░░░░░░░░░░░░░░░ 4.0% | |
Markdown 0 secs ░░░░░░░░░░░░░░░░░░░░░ 0.5% | |
JSON 0 secs ░░░░░░░░░░░░░░░░░░░░░ 0.3% |
Note:
When this guide is more complete, the plan is to move it into Prepack documentation.
For now I put it out as a gist to gather initial feedback.
If you're building JavaScript apps, you might already be familiar with some tools that compile JavaScript code to equivalent JavaScript code: