(parent: string, child: string)
| 40 | ]; |
| 41 | |
| 42 | function 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 |
no outgoing calls
no test coverage detected