mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-24 23:00:19 +03:00
* feat(ui): added c-select in the ui lib * refactor(ui): switched n-select to c-select
6 lines
162 B
TypeScript
6 lines
162 B
TypeScript
function clamp({ value, min = 0, max = 100 }: { value: number; min?: number; max?: number }) {
|
|
return Math.min(Math.max(value, min), max);
|
|
}
|
|
|
|
export { clamp };
|