It's a shame JS doesn't have something like Doxygen - as you write the code, you put information into specially formatted comments, and then Doxygen extracts that information, the information about function calls and parameters from the actual source, and creates a document with call trees...