code: function toRouteMap(routeList) {
  	var routeMap = {};
  	for (var i = 0, len = routeList.length; i < len; i++) {
  		var route = routeList[i];
  		routeMap[route['path']] = route;
  	}
  	return routeMap;
  }
docs: Transforms route list into a map of routes indexed by path.