Skip to content

Instantly share code, notes, and snippets.

@alexewerlof
Created September 30, 2020 12:12
Show Gist options
  • Save alexewerlof/4911c7c3b5b05d51925c3a70f9306b10 to your computer and use it in GitHub Desktop.
Save alexewerlof/4911c7c3b5b05d51925c3a70f9306b10 to your computer and use it in GitHub Desktop.
// Fails as soon as one of the map functions fails
const results = await Promise.all(array.map(asynMapFunction))
// Continues running even if one map function fails
const results = await Promise.allSettled(array.map(asynMapFunction))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment