I'm trying to add to or modify the existing rules for Javascript functions in order to show nested (or member) functions in the function list. For example:
function parentA (base){
function childA (exp){
return Math.pow(base, exp);
}
The **parentA** and **parentB** functions are listed, but the **childA** and **childB** functions are **not** listed. This nested-child paradigm is common within Javascript libraries and reusable code, and important to be fully navigable in the function list.
Can this be done with groups and/or subgroups? I've tried digging through the parsing rules for other class-based languages (that list member functions using subgroups), but I can't seem to get this to work for Javascript.
Any suggestions? I'm probably being stupid, but I'm going crazy trying to figure this one out - please help! ;)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm trying to add to or modify the existing rules for Javascript functions in order to show nested (or member) functions in the function list. For example:
function parentA (base){
function childA (exp){
return Math.pow(base, exp);
}
alert(childA(2)); // call private function
}
parentA(4); // alerts 4^2 = 16
var parentB = function(str1){
return {
childB: function(str2){
alert(str1 + str2);
}
};
}('foo');
parentB.childB('bar'); // alerts 'foobar'
The **parentA** and **parentB** functions are listed, but the **childA** and **childB** functions are **not** listed. This nested-child paradigm is common within Javascript libraries and reusable code, and important to be fully navigable in the function list.
Can this be done with groups and/or subgroups? I've tried digging through the parsing rules for other class-based languages (that list member functions using subgroups), but I can't seem to get this to work for Javascript.
Any suggestions? I'm probably being stupid, but I'm going crazy trying to figure this one out - please help! ;)