1
0
Fork 0
mirror of https://github.com/CorentinTh/it-tools.git synced 2025-07-18 20:59:37 +02:00
it-tools/src/modules/shared/number.models.ts
Corentin THOMASSET dfa1ba8554
feat(ui): added c-select in the ui lib (#550)
* feat(ui): added c-select in the ui lib

* refactor(ui): switched n-select to c-select
2023-08-07 15:30:00 +00:00

5 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 };