code: function getRouteParams(route, params) {
    var routeParams = {};
  
    if (!route.path) return routeParams;
  
    (0, _PatternUtils.getParamNames)(route.path).forEach(function (p) {
      if (Object.prototype.hasOwnProperty.call(params, p)) {
        routeParams[p] = params[p];
      }
    });
  
    return routeParams;
  }
docs: Extracts an object of params the given route cares about from
  the given params object.