One day I needed to get the function name from the function itself. Here is what I found.
function functionName(fn) { var name=/\W*function\s+([\w\$]+)\(/.exec(fn); if(!name)return 'No name'; return name[1]; }
via http://bytes.com/topic/javascript/answers/640929-obtain-function-name
Latest posts by Fab (see all)
- La Horde du Contrevent : review - 13 October 2024
- For Whom the Bells Tolls: review - 4 August 2024
- Self Aware On Air Neon Sign - 8 June 2024