Last active
August 29, 2015 14:15
-
-
Save ourmaninamsterdam/53e5b87167a411ada149 to your computer and use it in GitHub Desktop.
Get function name (http://stackoverflow.com/questions/2648293/javascript-get-function-name?answertab=oldest#tab-top)
This file contains hidden or 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
function getFunctionName (fn) { | |
return fn.toString().substr(0, fn.toString().indexOf('(')).replace('function ', ''); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment