Is there a method or propertie to get all methods from an object? For example:
function foo() {} foo.prototype.a = function() {} foo.prototype.b = function()
var methods = []; for (var key in foo.prototype) { if (typeof foo.prototype[key] === "function") { methods.push(key); } }
You can simply loop over the prototype of a constructor and extract all methods.