Outlook_Addin_LLM/node_modules/@fluentui/react-utilities/lib/utils/clamp.js

9 lines
282 B
JavaScript

/**
* @internal
* Clamps `value` to a number between the min and max.
*
* @param value - the value to be clamped
* @param min - the lowest valid value
* @param max - the highest valid value
*/ export const clamp = (value, min, max)=>Math.max(min, Math.min(max, value || 0));