MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / clamp

Function clamp

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

Source from the content-addressed store, hash-verified

416 * Used to enforce sane limits on MCP tool inputs.
417 */
418export function clamp(value: number, min: number, max: number): number {
419 return Math.max(min, Math.min(max, value));
420}
421
422/**
423 * 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