Skip to content

Instantly share code, notes, and snippets.

@andrienko
Last active August 29, 2015 13:57
Show Gist options
  • Save andrienko/9608847 to your computer and use it in GitHub Desktop.
Save andrienko/9608847 to your computer and use it in GitHub Desktop.
Get the function name
Function.prototype.name = function(){
return this.toString().match(/function ([^\(]+)/)[1];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment