An open API service indexing awesome lists of open source software.

https://github.com/aleclarson/clampvalue

Prevent a value from being out of range
https://github.com/aleclarson/clampvalue

Last synced: 2 months ago
JSON representation

Prevent a value from being out of range

Awesome Lists containing this project

README

          

# clampValue v1.0.0 ![locked](https://img.shields.io/badge/stability-locked-0084B6.svg?style=flat)

```js
const clampValue = require('clampValue');

let newValue = clampValue(value, minValue, maxValue);
```

- An error is thrown when `minValue > maxValue`