UNPKG

@snipsonian/redux-first-router

Version:

Redux-first-router snippets

12 lines (11 loc) 342 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function toRoutesMap(routes) { return Object.keys(routes) .reduce((accumulator, routeKey) => { const { path } = routes[routeKey]; accumulator[routeKey] = { path }; return accumulator; }, {}); } exports.default = toRoutesMap;