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

Function generatePath

core/src/components/router/utils/path.ts:5–9  ·  view source on GitHub ↗
(segments: string[])

Source from the content-addressed store, hash-verified

3
4/** Join the non empty segments with "/". */
5export const generatePath = (segments: string[]): string => {
6 const path = segments.filter((s) => s.length > 0).join('/');
7
8 return '/' + path;
9};
10
11const generateUrl = (segments: string[], useHash: boolean, queryString?: string, fragment?: string) => {
12 let url = generatePath(segments);

Callers 7

navChangedMethod · 0.90
routeChangeEventMethod · 0.90
printRoutesFunction · 0.90
printRedirectsFunction · 0.90
getRoutePathFunction · 0.90
path.spec.tsxFile · 0.90
generateUrlFunction · 0.85

Calls

no outgoing calls

Tested by 1

getRoutePathFunction · 0.72