(routes: RouteChain[])
| 2 | import { generatePath } from './path'; |
| 3 | |
| 4 | export const printRoutes = (routes: RouteChain[]) => { |
| 5 | console.group(`[ion-core] ROUTES[${routes.length}]`); |
| 6 | for (const chain of routes) { |
| 7 | const segments: string[] = []; |
| 8 | chain.forEach((r) => segments.push(...r.segments)); |
| 9 | const ids = chain.map((r) => r.id); |
| 10 | console.debug( |
| 11 | `%c ${generatePath(segments)}`, |
| 12 | 'font-weight: bold; padding-left: 20px', |
| 13 | '=>\t', |
| 14 | `(${ids.join(', ')})` |
| 15 | ); |
| 16 | } |
| 17 | console.groupEnd(); |
| 18 | }; |
| 19 | |
| 20 | export const printRedirects = (redirects: RouteRedirect[]) => { |
| 21 | console.group(`[ion-core] REDIRECTS[${redirects.length}]`); |
no test coverage detected