events.js
function (callback, context, args) {
  var arg1, arg2, arg3
  arg1 = args[0]
  arg2 = args[1]
  arg3 = args[2]
  switch (args.length) {
    case 0:
      callback.call(context); return
    case 1:
      callback.call(context, arg1); return
    case 2:
      callback.call(arg1, arg2); return
    case 3:
      callback.call(context, arg1, arg2, arg3); return
    default:
      callback.apply(context, args); return
  }
}
function (callback, context, args) {
  var arg1, arg2, arg3
  arg1 = args[0]
  arg2 = args[1]
  arg3 = args[2]
  switch (args.length) {
    case 0:
      callback.call(context); return
    case 1:
      callback.call(context, arg1); return
    case 2:
      callback.call(arg1, arg2); return
    case 3:
      callback.call(context, arg1, arg2, arg3); return
    default:
      callback.apply(context, args); return
  }
}
function ( callback , context , args ) { var arg1 , arg2 , arg3 arg1 = args [ 0 ] arg2 = args [ 1 ] arg3 = args [ 2 ] switch ( args . length ) { case 0 : callback . call ( context ) ; return case 1 : callback . call ( context , arg1 ) ; return case 2 : callback . call ( arg1 , arg2 ) ; return case 3 : callback . call ( context , arg1 , arg2 , arg3 ) ; return default : callback . apply ( context , args ) ; return } }
This is probably overkill... but what the hell, why not?
This is probably overkill ... but what the hell why not?