core/router.js
function(request, params, route) {
        var uRe         = params.url.split(/\//)
            , uRo       = route.split(/\//)
            , maxLen    = uRo.length
            , score     = 0
            , r         = {}
            , i         = 0;

        //attaching routing description for this request
        request.routing = params; // can be retried in controller with: req.routing

        if (uRe.length === uRo.length) {
            for (; i<maxLen; ++i) {
                if (uRe[i] === uRo[i]) {
                    ++score
                } else if (score == i && hasParams(uRo[i]) && fitsWithRequirements(request, uRo[i], uRe[i], params)) {
                    ++score
                }
            }
        }

        r.past = (score === maxLen) ? true : false;
        r.request = request;

        return r
    }
function(request, params, route) {
        var uRe         = params.url.split(/\//)
            , uRo       = route.split(/\//)
            , maxLen    = uRo.length
            , score     = 0
            , r         = {}
            , i         = 0;

        //attaching routing description for this request
        request.routing = params; // can be retried in controller with: req.routing

        if (uRe.length === uRo.length) {
            for (; i<maxLen; ++i) {
                if (uRe[i] === uRo[i]) {
                    ++score
                } else if (score == i && hasParams(uRo[i]) && fitsWithRequirements(request, uRo[i], uRe[i], params)) {
                    ++score
                }
            }
        }

        r.past = (score === maxLen) ? true : false;
        r.request = request;

        return r
    }
function ( request , params , route ) { var uRe = params . url . split ( / \/ / ) , uRo = route . split ( / \/ / ) , maxLen = uRo . length , score = 0 , r = { } , i = 0 ; //attaching routing description for this request request . routing = params ; // can be retried in controller with: req.routing if ( uRe . length === uRo . length ) { for ( ; i < maxLen ; ++ i ) { if ( uRe [ i ] === uRo [ i ] ) { ++ score } else if ( score == i && hasParams ( uRo [ i ] ) && fitsWithRequirements ( request , uRo [ i ] , uRe [ i ] , params ) ) { ++ score } } } r . past = ( score === maxLen ) ? true : false ; r . request = request ; return r }
Parse routing for mathcing url

@param {object} request
@param {object} params
@param {string} route

@return
Parse routing for mathcing url