MCPcopy
hub / github.com/DavidHDev/react-bits / clamp

Function clamp

src/components/common/Preview/PreviewSlider.jsx:4–4  ·  view source on GitHub ↗
(val, min, max)

Source from the content-addressed store, hash-verified

2import '../../../css/preview-slider.css';
3
4const clamp = (val, min, max) => Math.min(Math.max(val, min), max);
5const stepDecimals = (step) => {
6 const s = step.toString();
7 const dot = s.indexOf('.');

Callers 1

PreviewSliderFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected