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.