clamp-number
v1.1.1
Published
Clamp number between range
Downloads
1
Readme
clamp-number
Clamp value between range
Usage
var clamp = require('clamp-number')
clamp(2, 0, 3) // == 2
clamp(10, 0, 3) // == 3
clamp(-5, 0, 3) // == 0
License
MIT, see LICENSE.md for details.