I can dynamically create a function via:
new Function(['param1', 'param2'], someRotine);
However, how would I go about creating one that's async?
I tried
new AsyncFunction(['param1', 'param2'], someRotine);
but I am getting:
AsyncFunction is not defined
I am on node v14.17.0.
eval('async function() {'+code+'}')(or the same withnew Function, if you care about scope) would also work