I\'m trying to get the name of the currently running function. From what I\'ve read, this should be possible using:
(arguments.callee.toString()).match(/func
/function\s+(\[^\s\(]+)/
What's with the backslash before [? I don't think you want a literal square bracket here. Without that it should work.
Although I'd strongly recommend against anything to do with sniffing function name or especially sniffing caller function. Almost anything you might do using these hideous hacks will be better done using some combination of closures and lookups.