MOON
Server: Apache
System: Linux nserver.cafsindia.com 4.18.0-553.104.1.lve.el8.x86_64 #1 SMP Tue Feb 10 20:07:30 UTC 2026 x86_64
User: cafsindia (1002)
PHP: 8.2.30
Disabled: NONE
Upload Files
File: /home/cafsindia/snap.cafsinfotech.in/node_modules/clamp/README.md
# clamp [![frozen](http://hughsk.github.io/stability-badges/dist/frozen.svg)](http://github.com/hughsk/stability-badges) #

Clamp a value between two other values. It's as simple as modules come - saving
keystrokes because I've had to write this function too many times.

## Usage ##

[![clamp](https://nodei.co/npm/clamp.png?mini=true)](https://nodei.co/npm/clamp)

### `clamp(value, a, b)` ###

Returns `value`, if it is between `a` and `b`. Otherwise, returns the number
it's gone past.

## License ##

MIT. See [LICENSE.md](http://github.com/hughsk/clamp/blob/master/LICENSE.md) for details.