I have a list of async functions that each have a condtion such that the function should be called if and only if the corresponding condition is met and I want to run all of the functions parallely. Example:
await Promise.all([asyncFunc1(), asyncFunc2(), ...])
Each function in the list should be called if and only if the corresponding conditions: cond1
, cond2
, ... are met. What is the best way of doing this?