src/router.js
function match(routes = [], path) {
  for (var i = 0; i < routes.length; i++) {
    var re = pathRegexps[routes[i].path] || pathToRegexp(routes[i].path);
    pathRegexps[routes[i].path] = re;

    if (re && re.test(path)) {
      return { re, route: routes[i] };
    }
  }

  return false;
}
function match(routes = [], path) {
  for (var i = 0; i < routes.length; i++) {
    var re = pathRegexps[routes[i].path] || pathToRegexp(routes[i].path);
    pathRegexps[routes[i].path] = re;

    if (re && re.test(path)) {
      return { re, route: routes[i] };
    }
  }

  return false;
}
function match ( routes = [ ] , path ) { for ( var i = 0 ; i < routes . length ; i ++ ) { var re = pathRegexps [ routes [ i ] . path ] || pathToRegexp ( routes [ i ] . path ) ; pathRegexps [ routes [ i ] . path ] = re ; if ( re && re . test ( path ) ) { return { re , route : routes [ i ] } ; } } return false ; }
Return the first matching route.
Return the first matching route .