MCPcopy Index your code
hub / github.com/ionic-team/ionic-framework / printRoutes

Function printRoutes

core/src/components/router/utils/debug.ts:4–18  ·  view source on GitHub ↗
(routes: RouteChain[])

Source from the content-addressed store, hash-verified

2import { generatePath } from './path';
3
4export 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
20export const printRedirects = (redirects: RouteRedirect[]) => {
21 console.group(`[ion-core] REDIRECTS[${redirects.length}]`);

Callers 1

printDebugMethod · 0.90

Calls 2

generatePathFunction · 0.90
pushMethod · 0.45

Tested by

no test coverage detected