MCPcopy Create free account
hub / github.com/editablejs/editable / clamp

Function clamp

packages/ui/src/utils.ts:65–67  ·  view source on GitHub ↗
(value: number, [min, max]: [number, number])

Source from the content-addressed store, hash-verified

63 : React.useEffect
64
65export const clamp = (value: number, [min, max]: [number, number]): number => {
66 return Math.min(max, Math.max(min, value))
67}

Callers 1

getThumbOffsetFromScrollFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…