MCPcopy Create free account
hub / github.com/Effect-TS/effect / normalizeSignature

Function normalizeSignature

packages/tools/jsdocs/src/Jsdocs.ts:2786–2793  ·  view source on GitHub ↗
(cwd: string, text: string)

Source from the content-addressed store, hash-verified

2784}
2785
2786function normalizeSignature(cwd: string, text: string): string | null {
2787 const normalizedCwd = normalizePathName(cwd)
2788 const signature = text.replaceAll(normalizedCwd, ".").replaceAll(cwd, ".").replace(/\r\n?/g, "\n").replace(
2789 /[ \t]+$/gm,
2790 ""
2791 ).trim()
2792 return signature === "" ? null : signature
2793}
2794
2795function displaySignature(text: string): string {
2796 return text.replace(/import\((?:"[^"]+"|'[^']+')\)\.([A-Za-z_$][A-Za-z0-9_$]*(?:\.[A-Za-z_$][A-Za-z0-9_$]*)*)/g, "$1")

Callers 2

parseableSignatureFunction · 0.85
functionSignatureFunction · 0.85

Calls 2

normalizePathNameFunction · 0.70
replaceMethod · 0.45

Tested by

no test coverage detected