event-proxy.js
function proxy(scope, map, emitter) {
  var args = slice.call(arguments, 3)
    , tmp = {}, len, name, methods, method, i

  if (isArray(map)) {
    len = map.length
    while (len--) {
      tmp[map[len]] = map[len]
    }
    map = tmp
  }
  for (name in map) {
    methods = map[name]
    if (!isArray(methods)) {
      methods = [methods]
    }
    for (i = 0; i < methods.length; i++) {
      method = methods[i]
      if (typeof method === 'string') {
        method = scope[method]
      }
      if (!method) {
        throw new Error('Proxy: method `' + method + '` does not exist')
      }
      emitter[listener](name, bind.apply(scope, concat.apply([scope, method], args)))
    }
  }
}
function proxy(scope, map, emitter) {
  var args = slice.call(arguments, 3)
    , tmp = {}, len, name, methods, method, i

  if (isArray(map)) {
    len = map.length
    while (len--) {
      tmp[map[len]] = map[len]
    }
    map = tmp
  }
  for (name in map) {
    methods = map[name]
    if (!isArray(methods)) {
      methods = [methods]
    }
    for (i = 0; i < methods.length; i++) {
      method = methods[i]
      if (typeof method === 'string') {
        method = scope[method]
      }
      if (!method) {
        throw new Error('Proxy: method `' + method + '` does not exist')
      }
      emitter[listener](name, bind.apply(scope, concat.apply([scope, method], args)))
    }
  }
}
function proxy ( scope , map , emitter ) { var args = slice . call ( arguments , 3 ) , tmp = { } , len , name , methods , method , i if ( isArray ( map ) ) { len = map . length while ( len -- ) { tmp [ map [ len ] ] = map [ len ] } map = tmp } for ( name in map ) { methods = map [ name ] if ( ! isArray ( methods ) ) { methods = [ methods ] } for ( i = 0 ; i < methods . length ; i ++ ) { method = methods [ i ] if ( typeof method === 'string' ) { method = scope [ method ] } if ( ! method ) { throw new Error ( 'Proxy: method `' + method + '` does not exist' ) } emitter [ listener ] ( name , bind . apply ( scope , concat . apply ( [ scope , method ] , args ) ) ) } } }
Setup all proxy methods, if an array is supplied for the methods
the event will be proxied to a method of the same name

Examples:

proxy()

@param {Object} scope of method calls
@param {Array|Objects} methods to bind
@param {Object} event emitting object
@param {...} additional arguments to be used on every method
@api public
Setup all proxy methods if an array is supplied for the methods the event will be proxied to a method of the same name