Skip to content

Instantly share code, notes, and snippets.

@ypetya
Last active August 29, 2015 14:06
Show Gist options
  • Save ypetya/dce5244facc76f811c75 to your computer and use it in GitHub Desktop.
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
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