code: function createRouteMap (
    routes,
    oldPathList,
    oldPathMap,
    oldNameMap
  ) {
    // the path list is used to control path matching priority
    var pathList = oldPathList || [];
    var pathMap = oldPathMap || Object.create(null);
    var nameMap = oldNameMap || Object.create(null);
  
    routes.forEach(function (route) {
      addRouteRecord(pathList, pathMap, nameMap, route);
    });
  
    // ensure wildcard routes are always at the end
    for (var i = 0, l = pathList.length; i < l; i++) {
      if (pathList[i] === '*') {
        pathList.push(pathList.splice(i, 1)[0]);
        l--;
        i--;
      }
    }
  
    return {
      pathList: pathList,
      pathMap: pathMap,
      nameMap: nameMap
    }
  }
docs: /*