framework/js/lib/utils/map-routes.js
2015-04-25 22:28:39 +09:30

8 lines
144 B
JavaScript

export default function mapRoutes(routes) {
var map = {};
for (var r in routes) {
map[routes[r][0]] = routes[r][1];
}
return map;
}