MCPcopy Index your code
hub / github.com/ionic-team/ionic-framework / clamp

Function clamp

core/src/utils/helpers.ts:284–286  ·  view source on GitHub ↗
(min: number, n: number, max: number)

Source from the content-addressed store, hash-verified

282};
283
284export const clamp = (min: number, n: number, max: number) => {
285 return Math.max(min, Math.min(n, max));
286};
287
288export const assert = (actual: any, reason: string) => {
289 if (!actual) {

Callers 15

handleFooterFadeFunction · 0.90
onEndMethod · 0.90
renderProgressFunction · 0.90
RangeClass · 0.90
updateMethod · 0.90
setPressedKnobMethod · 0.90
ratioToValueFunction · 0.90
valueToRatioFunction · 0.90
handleContentScrollFunction · 0.90
handleHeaderFadeFunction · 0.90
onEndMethod · 0.90
refreshMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected