(options: {
readonly cwd: string
readonly include?: ReadonlyArray<string>
readonly exclude?: ReadonlyArray<string>
})
| 479 | |
| 480 | function diagnostic(code: string, message: string): JSDocDiagnostic { |
| 481 | return { code, message } |
| 482 | } |
| 483 | |
| 484 | function normalizePathName(filePath: string): string { |
| 485 | return filePath.replaceAll(path.sep, "/") |
| 486 | } |
| 487 | |
| 488 | function normalizePackagePath(filePath: string): string { |
| 489 | return normalizePathName(filePath).replace(/^\.\//, "./") |
| 490 | } |
| 491 | |
| 492 | function escapeRegExp(value: string): string { |
| 493 | return value.replace(/[|\\{}()[\]^$+?.]/g, "\\$&") |
| 494 | } |
| 495 | |
| 496 | function globToRegExp(glob: string): RegExp { |
| 497 | let source = "^" |
| 498 | for (let index = 0; index < glob.length; index++) { |
| 499 | const char = glob[index] |
| 500 | const next = glob[index + 1] |
| 501 | if (char === "*") { |
| 502 | if (next === "*") { |
| 503 | source += ".*" |
nothing calls this directly
no test coverage detected
searching dependent graphs…