(index, path)
| 280 | return new Pattern(this.#pattern, this.#globStrings, indexes, symlinks, realpaths); |
| 281 | } |
| 282 | test(index, path) { |
| 283 | if (index > this.#pattern.length) { |
| 284 | return false; |
| 285 | } |
| 286 | const pattern = this.#pattern[index]; |
| 287 | if (pattern === lazyMinimatch().GLOBSTAR) { |
| 288 | return true; |
| 289 | } |
| 290 | if (typeof pattern === 'string') { |
| 291 | return pattern === path; |
| 292 | } |
| 293 | if (typeof pattern?.test === 'function') { |
| 294 | return pattern.test(path); |
| 295 | } |
| 296 | return false; |
| 297 | } |
| 298 | |
| 299 | cacheKey(index) { |
| 300 | let key = ''; |
no test coverage detected