Skip to content

Instantly share code, notes, and snippets.

@mmomtchev
Last active June 13, 2020 09:54
Show Gist options
  • Save mmomtchev/90d290138a84627da893d435293d445e to your computer and use it in GitHub Desktop.
Save mmomtchev/90d290138a84627da893d435293d445e to your computer and use it in GitHub Desktop.
let p = [];
for (let url of urls) {
p.push(download(url)
.then((html) => {
data[url] = parse(html);
})
.catch((e) => console.error(e)));
}
await Promise.allSettled(p);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment