code: function routeIsActive(pathname, routes, params) {
    var remainingPathname = pathname,
        paramNames = [],
        paramValues = [];
  
    // for...of would work here but it's probably slower post-transpilation.
    for (var i = 0, len = routes.length; i < len; ++i) {
      var route = routes[i];
      var pattern = route.path || '';
  
      if (pattern.charAt(0) === '/') {
        remainingPathname = pathname;
        paramNames = [];
        paramValues = [];
      }
  
      if (remainingPathname !== null && pattern) {
        var matched = (0, _PatternUtils.matchPattern)(pattern, remainingPathname);
        if (matched) {
          remainingPathname = matched.remainingPathname;
          paramNames = [].concat(paramNames, matched.paramNames);
          paramValues = [].concat(paramValues, matched.paramValues);
        } else {
          remainingPathname = null;
        }
  
        if (remainingPathname === '') {
          // We have an exact match on the route. Just check that all the params
          // match.
          // FIXME: This doesn't work on repeated params.
          return paramNames.every(function (paramName, index) {
            return String(paramValues[index]) === String(params[paramName]);
          });
        }
      }
    }
  
    return false;
  }
docs: Returns true if the given pathname matches the active routes and params.