@19h47/clamp
@19h47/clamp is a small module to clamp a number between an upper and lower bound.
import clamp from '@19h47/clamp';
clamp(100, 0, 50); // 50
Test
yarn test
@19h47/clamp is a small module to clamp a number between an upper and lower bound.
import clamp from '@19h47/clamp';
clamp(100, 0, 50); // 50
yarn test
npm i @19h47/clamp
2
1.0.3
MIT
3.02 kB
3