Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@hellomonday/clamp

hellomonday6MIT1.0.1TypeScript support: included

Constrain a value to lie between two further values

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