Last active
August 29, 2015 14:06
-
-
Save ypetya/dce5244facc76f811c75 to your computer and use it in GitHub Desktop.
Print out javascript object's functions to the console. Originates from http://stackoverflow.com/questions/5842654/javascript-get-objects-methods
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var printFunctions = function(myObject){ | |
var funcs = [] | |
for(var name in myObject) { | |
if(typeof myObject[name] === 'function') { | |
funcs.push(name) | |
} | |
} | |
console.info(push.sort()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment