(filePath: string)
| 48 | ]); |
| 49 | |
| 50 | function normalizePathKey(filePath: string): string { |
| 51 | let normalized = path.resolve(filePath); |
| 52 | while (normalized.length > 1 && (normalized.endsWith('/') || normalized.endsWith('\\'))) { |
| 53 | normalized = normalized.slice(0, -1); |
| 54 | } |
| 55 | return process.platform === 'win32' ? normalized.toLowerCase() : normalized; |
| 56 | } |
| 57 | |
| 58 | export function isPathWithin(basePath: string, candidatePath: string): boolean { |
| 59 | const resolvedBasePath = path.resolve(basePath); |
no outgoing calls
no test coverage detected