(candidate: string, root: string)
| 21 | } |
| 22 | |
| 23 | function isWithin(candidate: string, root: string): boolean { |
| 24 | const relative = path.relative(root, candidate); |
| 25 | return relative === '' || (!relative.startsWith('..') && !path.isAbsolute(relative)); |
| 26 | } |
no outgoing calls
no test coverage detected