lib/loader/main.js
function wrapMethod(app,fn){
    //Override original express method
    return function(){
        let args = Array.prototype.slice.call(arguments)
        //Check if any middleware argument is a generator function
        for( let i=0; i<args.length; i++ ){
            //Wrap this if necessary
            args[i] = controllerWrapper(args[i])
        }
        
        //Call original method handler
        return fn.apply(app,args)
    }
}
function wrapMethod(app,fn){
    //Override original express method
    return function(){
        let args = Array.prototype.slice.call(arguments)
        //Check if any middleware argument is a generator function
        for( let i=0; i<args.length; i++ ){
            //Wrap this if necessary
            args[i] = controllerWrapper(args[i])
        }
        
        //Call original method handler
        return fn.apply(app,args)
    }
}
function wrapMethod ( app , fn ) { //Override original express method return function ( ) { let args = Array . prototype . slice . call ( arguments ) //Check if any middleware argument is a generator function for ( let i = 0 ; i < args . length ; i ++ ) { //Wrap this if necessary args [ i ] = controllerWrapper ( args [ i ] ) } //Call original method handler return fn . apply ( app , args ) } }
Wrap an express method handler

@param {ExpressApp} app
@param {Function} fn
@returns {Function}
Wrap an express method handler