Is there a way to check if the javascript function has an callback or asynchronous operation?

54 Views Asked by At

Is there an API or package (built-in or third-party) which can take a string of javascript code (specifically a function for my case), profile the same and tell if there is any asynchronous operation or a callback in that method?

For example, if there is a function

function f1()
{
  console.log(arguments);
}

If I do f1.toString().split("\n").join( "\\n" ), I would get a string

"function f1()\n    {\n      console.log(arguments)\n    }"

I want to be able to profile the code and see if there was any asynchronous operation in this string. Is it possible?

Thanks.

0

There are 0 best solutions below