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

Function clamp

src/ink/layout/geometry.ts:93–97  ·  view source on GitHub ↗
(value: number, min?: number, max?: number)

Source from the content-addressed store, hash-verified

91}
92
93export function clamp(value: number, min?: number, max?: number): number {
94 if (min !== undefined && value < min) return min
95 if (max !== undefined && value > max) return max
96 return value
97}
98

Callers 6

stepFunction · 0.85
FuzzyPickerFunction · 0.85
extendSelectionFunction · 0.85
shiftAnchorFunction · 0.85
shiftFunction · 0.85
shiftSelectionForFollowFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected