can anyone help me on how to retrieve function parameter names? For example:
var A = function(a, b, c) {};
I need to get the parameter name
The only way would be to retrieve the function as a string and use a RegExp to get the parameter names:
RegExp
function test(a,b,c){/*function body*/} //=> this should return 'a,b,c': test.toString().replace(/(function.+\()(.+(?=\)))(.+$)/,'$2');