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()
function getMethods(obj) { var res = []; for(var m in obj) { if(typeof obj[m] == "function") { res.push(m) } } return res; }