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

Function normalizeSignature

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

Source from the content-addressed store, hash-verified

2854}
2855
2856function normalizeSignature(cwd: string, text: string): string | null {
2857 const normalizedCwd = normalizePathName(cwd)
2858 const signature = text.replaceAll(normalizedCwd, ".").replaceAll(cwd, ".").replace(/\r\n?/g, "\n").replace(
2859 /[ \t]+$/gm,
2860 ""
2861 ).trim()
2862 return signature === "" ? null : signature
2863}
2864
2865function displaySignature(text: string): string {
2866 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 3

trimMethod · 0.80
normalizePathNameFunction · 0.70
replaceMethod · 0.45

Tested by

no test coverage detected