I have to pass a function to another function, and execute it as a callback. The problem is that sometimes this function is async, like:
async function() {
Hei,
Here is an approach provided by David Walsh in his blogpost:
const isAsync = myFunction.constructor.name === "AsyncFunction";
Cheers!