Assuming Sugar.js is installed, you can run this to add a before
method to all functions.
Function.extend( {
before: function( func ) {
// TODO: could add ability to output function name (via this.toString() and a regex)
// TODO: could add ability to modify arguments before getting passed to function
var that = this;
return function() {
var args = Array.create( arguments );