(filePath: string, rootDir: string)
| 170 | } |
| 171 | |
| 172 | function isPathInside(filePath: string, rootDir: string): boolean { |
| 173 | const relative = path.relative(rootDir, filePath); |
| 174 | return relative === '' || (!relative.startsWith('..') && !path.isAbsolute(relative)); |
| 175 | } |
no test coverage detected