(basePath, subPath)
| 1018 | return `./helper/${helperName}` |
| 1019 | } |
| 1020 | function normalizeAndJoin(basePath, subPath) { |
| 1021 | // Normalize and convert slashes to forward slashes in one step |
| 1022 | const normalizedBase = path.posix.normalize(basePath.replace(/\\/g, '/')) |
| 1023 | const normalizedSub = path.posix.normalize(subPath.replace(/\\/g, '/')) |
| 1024 | |
| 1025 | // If subPath is absolute (starts with "/"), return it as the final path |
| 1026 | if (normalizedSub.startsWith('/')) { |
| 1027 | return normalizedSub |
| 1028 | } |
| 1029 | |
| 1030 | // Join the paths using POSIX-style |
| 1031 | return path.posix.join(normalizedBase, normalizedSub) |
| 1032 | } |
no outgoing calls
no test coverage detected