Module

x/lodash_es/src/number.js>clamp

lodash for deno use
Latest
function clamp
import { clamp } from "https://dotland.deno.dev/x/lodash_es@v0.0.2/src/number.js";

Clamps number within the inclusive lower and upper bounds.

Examples

_.clamp(-10, -5, 5); // => -5

_.clamp(10, -5, 5); // => 5

Parameters

number

The number to clamp.

lower

The upper bound.

upper