MCPcopy Index your code
hub / github.com/codeaashu/claude-code / formatNum

Function formatNum

src/utils/mcp/elicitationValidation.ts:187–188  ·  view source on GitHub ↗
(n: number)

Source from the content-addressed store, hash-verified

185 const typeLabel = schema.type === 'integer' ? 'an integer' : 'a number'
186 const isInteger = schema.type === 'integer'
187 const formatNum = (n: number) =>
188 Number.isInteger(n) && !isInteger ? `${n}.0` : String(n)
189
190 // Build a single descriptive error message for range violations
191 const rangeMsg =

Callers 2

getZodSchemaFunction · 0.85
getFormatHintFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected