lib/router.js
function routeSolver(routeItem, handler, resolver) {
    switch (typeof handler) {
    case 'function':
        // solve as function handler
        registerHandler(routeItem, null, routeItem.handler);
        break;
    case 'string':
        // solve as controller - action handler
        resolver(routeItem, handler);
        break;
    default:
        throw new Error('unknow route type');
    }
}
function routeSolver(routeItem, handler, resolver) {
    switch (typeof handler) {
    case 'function':
        // solve as function handler
        registerHandler(routeItem, null, routeItem.handler);
        break;
    case 'string':
        // solve as controller - action handler
        resolver(routeItem, handler);
        break;
    default:
        throw new Error('unknow route type');
    }
}
function routeSolver ( routeItem , handler , resolver ) { switch ( typeof handler ) { case 'function' : // solve as function handler registerHandler ( routeItem , null , routeItem . handler ) ; break ; case 'string' : // solve as controller - action handler resolver ( routeItem , handler ) ; break ; default : throw new Error ( 'unknow route type' ) ; } }
determine route's type
determine route s type