skedify-calendar
Version:
Skedify Calendar React component
14 lines (13 loc) • 372 B
JavaScript
;
exports.__esModule = true;
exports.constrain = constrain;
/**
* Constrain an input between a lower and an upper boundary
*
* @param {number} input The input value to be constrained
* @param {number} min The lower boundary
* @param {number} max The upper boundary
*/
function constrain(input, min, max) {
return Math.min(max, Math.max(min, input));
}