index.js
function proxy (original, routes) {
  return new Proxy(original, {
    get(target, key, receiver) {
      const method = target[key]
      if (method) return method
      else return function (path, ...args) {
        const cb = args[0]
        if (typeof cb === 'function') {
          original.add(key, path, cb)
        } else {
          const fn = routes[key]
          return fn && fn.exec(path, ...args)
        }
      }
    }
  })
}
function proxy (original, routes) {
  return new Proxy(original, {
    get(target, key, receiver) {
      const method = target[key]
      if (method) return method
      else return function (path, ...args) {
        const cb = args[0]
        if (typeof cb === 'function') {
          original.add(key, path, cb)
        } else {
          const fn = routes[key]
          return fn && fn.exec(path, ...args)
        }
      }
    }
  })
}
function proxy ( original , routes ) { return new Proxy ( original , { get ( target , key , receiver ) { const method = target [ key ] if ( method ) return method else return function ( path , ... args ) { const cb = args [ 0 ] if ( typeof cb === 'function' ) { original . add ( key , path , cb ) } else { const fn = routes [ key ] return fn && fn . exec ( path , ... args ) } } } } ) }
Proxy function with router.

@param {Function} original
@param {Object} routes
@api private
Proxy function with router .