(path)
| 302 | } |
| 303 | |
| 304 | function withBasePath(path) { |
| 305 | const base = getBasePathFromLocation(); |
| 306 | const s = String(path || ''); |
| 307 | if (!base || !s.startsWith('/')) return s; |
| 308 | if (s === base || s.startsWith(base + '/')) return s; |
| 309 | return base + s; |
| 310 | } |
| 311 | |
| 312 | function joinPath(base, name) { |
| 313 | const b = String(base || '').trim(); |
no test coverage detected