@hellomonday/clamp

Constrain a value to lie between two further values

Usage no npm install needed!

<script type="module">
  import hellomondayClamp from 'https://cdn.skypack.dev/@hellomonday/clamp';
</script>

README

@hellomonday/clamp

Constrain a value to lie between two further values.

Install

$ npm install --save @hellomonday/clamp

Usage

const clampedValue = clamp(0, 10, 100);

License

MIT © Hello Monday