MCPcopy
hub / github.com/colbymchenry/codegraph / clamp

Function clamp

src/utils.ts:205–207  ·  view source on GitHub ↗
(value: number, min: number, max: number)

Source from the content-addressed store, hash-verified

203 * Used to enforce sane limits on MCP tool inputs.
204 */
205export function clamp(value: number, min: number, max: number): number {
206 return Math.max(min, Math.min(max, value));
207}
208
209/**
210 * Normalize a file path to use forward slashes.

Callers 6

handleSearchMethod · 0.90
handleCallersMethod · 0.90
handleCalleesMethod · 0.90
handleImpactMethod · 0.90
handleExploreMethod · 0.90
handleFilesMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected