Function
childRawPath
(parentRawPath: string, component: string)
Source from the content-addressed store, hash-verified
| 46 | } |
| 47 | |
| 48 | function childRawPath(parentRawPath: string, component: string): string { |
| 49 | if (component === '/') { |
| 50 | return '/'; |
| 51 | } |
| 52 | if (parentRawPath === '' || parentRawPath === '/') { |
| 53 | return `${parentRawPath}${component}`; |
| 54 | } |
| 55 | return `${parentRawPath}/${component}`; |
| 56 | } |
| 57 | |
| 58 | function addPath(root: PathTreeNode, parsedPath: ParsedPath): void { |
| 59 | let node = root; |
Tested by
no test coverage detected