SyntaxFix
Write A Post
Hire A Developer
Questions
Use constructor.name when you can, and regex function when I can't.
constructor.name
Function.prototype.getName = function(){ if (typeof this.name != 'undefined') return this.name; else return /function (.+)\(/.exec(this.toString())[1]; };