lib/httpserver.js
function urlWeight(config) {
    if (isUndefined(config) || config.url == undefined) { // eslint-disable-line eqeqeq
        return 0;
    }
    if (config.url instanceof RegExp) {
        return 1 + config.url.toString().length;
    }
    if (isFunction(config.url)) {
        return 1;
    }
    return 100 + config.url.length;
}
function urlWeight(config) {
    if (isUndefined(config) || config.url == undefined) { // eslint-disable-line eqeqeq
        return 0;
    }
    if (config.url instanceof RegExp) {
        return 1 + config.url.toString().length;
    }
    if (isFunction(config.url)) {
        return 1;
    }
    return 100 + config.url.length;
}
function urlWeight ( config ) { if ( isUndefined ( config ) || config . url == undefined ) { // eslint-disable-line eqeqeq return 0 ; } if ( config . url instanceof RegExp ) { return 1 + config . url . toString ( ) . length ; } if ( isFunction ( config . url ) ) { return 1 ; } return 100 + config . url . length ; }
Calculate relative weight of URL comparing object
@param {Object} config Internal object of URL comparing
@param {string|RegExp} [config.url] URL pattern to compare
@return {number} relative weight
Calculate relative weight of URL comparing object