(pattern: string)
| 134 | } |
| 135 | |
| 136 | function getDirectoryGlobMaxDepth(pattern: string): number { |
| 137 | const normalized = normalizeGlobPattern(pattern).replace(/\/+$/, '') |
| 138 | if (normalized.includes('**')) { |
| 139 | return Number.POSITIVE_INFINITY |
| 140 | } |
| 141 | if (!normalized) { |
| 142 | return 0 |
| 143 | } |
| 144 | return normalized.split('/').filter(Boolean).length |
| 145 | } |
| 146 | |
| 147 | function hasGlobCharacters(pattern: string): boolean { |
| 148 | return /[*?[{]/.test(pattern) |
no test coverage detected