MCPcopy Create free account
hub / github.com/effect-app/libs / createJSDocFileMatcher

Function createJSDocFileMatcher

repos/effect/packages/tools/jsdocs/src/Jsdocs.ts:481–500  ·  view source on GitHub ↗
(options: {
  readonly cwd: string
  readonly include?: ReadonlyArray<string>
  readonly exclude?: ReadonlyArray<string>
})

Source from the content-addressed store, hash-verified

479
480function diagnostic(code: string, message: string): JSDocDiagnostic {
481 return { code, message }
482}
483
484function normalizePathName(filePath: string): string {
485 return filePath.replaceAll(path.sep, "/")
486}
487
488function normalizePackagePath(filePath: string): string {
489 return normalizePathName(filePath).replace(/^\.\//, "./")
490}
491
492function escapeRegExp(value: string): string {
493 return value.replace(/[|\\{}()[\]^$+?.]/g, "\\$&")
494}
495
496function 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 += ".*"

Callers

nothing calls this directly

Calls 3

someMethod · 0.80
normalizePathNameFunction · 0.70
mapMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…