Repository URL to install this package:
|
Version:
5.0.1 ▾
|
/**
* we may have things like route-here/:named?optional
* this way we can get them by name easily
*/
import { config } from '../config'
import { RoutePathObjType } from '../typings'
const routePathCurrent = Object.seal({
path: '',
exact: true,
strict: false,
})
/**
* @modifies routePaths
*/
const routeToAttributes = (route: RoutePathObjType) => {
const attributes = {
key: route.path,
// exact: route.exact,
path: route.path,
component: route.component,
}
config.get('routePathsList').push(route.path)
return attributes
}
export { routeToAttributes, routePathCurrent }