MCPcopy Index your code
hub / github.com/forloopcodes/contextplus / normalizeWeight

Function normalizeWeight

src/tools/semantic-identifiers.ts:103–106  ·  view source on GitHub ↗
(value: number | undefined, fallback: number)

Source from the content-addressed store, hash-verified

101}
102
103function normalizeWeight(value: number | undefined, fallback: number): number {
104 if (value === undefined || !Number.isFinite(value) || value < 0) return fallback;
105 return value;
106}
107
108function formatLineRange(line: number, endLine: number): string {
109 return endLine > line ? `L${line}-L${endLine}` : `L${line}`;

Callers 1

semanticIdentifierSearchFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected