Get a list of currently defined functions in node.js


Is there any function that can be used to list all of the currently defined functions in node.js? I'd like to create a function like this:

function getAllDefinedFunctions(){
    //return all the functions that are currently defined
Problem courtesy of: Anderson Green


You can use a for / in loop to loop over all properties in this (the global object) and check whether typeof this[name] is 'function'.

Solution courtesy of: SLaks


There is currently no discussion for this recipe.

This recipe can be found in it's original form on Stack Over Flow.