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
- Host: GitHub
- URL: https://github.com/aleclarson/clampvalue
- Owner: aleclarson
- Created: 2016-02-13T03:36:26.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2018-12-15T09:52:00.000Z (over 7 years ago)
- Last Synced: 2025-01-18T02:44:03.203Z (over 1 year ago)
- Language: JavaScript
- Size: 0 Bytes
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# clampValue v1.0.0 
```js
const clampValue = require('clampValue');
let newValue = clampValue(value, minValue, maxValue);
```
- An error is thrown when `minValue > maxValue`