MCPcopy Create free account
hub / github.com/bytebase/bytebase / joinPath

Function joinPath

frontend/src/react/router/routes.tsx:42–47  ·  view source on GitHub ↗
(parent: string, child: string)

Source from the content-addressed store, hash-verified

40];
41
42function joinPath(parent: string, child: string): string {
43 if (!child) return parent || "/";
44 const left = parent.endsWith("/") ? parent.slice(0, -1) : parent;
45 const right = child.startsWith("/") ? child : `/${child}`;
46 return `${left}${right}` || "/";
47}
48
49// Flatten the nested route table into a `name -> full path pattern` map,
50// joining parent/child segments. Registered into `navigation.ts` at app boot so

Callers 1

buildRouteNameIndexFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected