One roundabout trick you can use is to first dump the function definition to the console:
geometa_map_new_map_init.toString();
The output may look something like this:
function(coords, options) {
// Some comment
if(some_logic == true)
do logic here
else
do other logic there
// Here's a very specific comment
var peculiar_name = 'some random string';
}
Notice that "geometa_map_new_map_init
" does not appear in this possible definition as there are ways to define named functions other than the typical function <name>
method. If any particular line looks unique enough, like "Here's a very specific comment
" or "var peculiar_name
" you can try searching for one of those lines in your source code. E.g., if you're in the base directory of your project on a linux machine you could run:
grep -l -R --exclude-dir=\.git "Here's a very specific comment" .|more
(The --exclude-dir
part tells grep to not search the version control data in the .git
directory, if one exists.)
If a file containing the line is found, open it up, search its contents, and you may find the function definition you're looking for, which might be defined in a way like:
geometa_map_new_map_init: function(coords, options) {
// Some comment
if(some_logic == true)
do logic here
else
do other logic there
// Here's a very specific comment
var peculiar_name = 'some random string';
}
In this example, we discover that the function is actually defined as part of an object, hence the <name>: function
syntax.