lib/router.js
function(req) {
      if(!req || !req.url) return false;

      if(typeof(path) === 'string') {
        return (req.url).match(path) && ((req.url).match(path).index === 0);

      // RegExp
      } else {
        return (req.url).match(path) !== null;
      }
    }
function(req) {
      if(!req || !req.url) return false;

      if(typeof(path) === 'string') {
        return (req.url).match(path) && ((req.url).match(path).index === 0);

      // RegExp
      } else {
        return (req.url).match(path) !== null;
      }
    }
function ( req ) { if ( ! req || ! req . url ) return false ; if ( typeof ( path ) === 'string' ) { return ( req . url ) . match ( path ) && ( ( req . url ) . match ( path ) . index === 0 ) ; // RegExp } else { return ( req . url ) . match ( path ) !== null ; } }
Check if the route matches

@return {Boolean} True if the URL matches and false otherwise
Check if the route matches