mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-14 20:17:03 +00:00
Merge remote-tracking branch 'origin/dev' into kai/fix/588-nested-session-guard
This commit is contained in:
commit
e32192177b
23 files changed
+1443
-26
No files matched your search
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* Clamp percentage-like values to a safe 0-100 range.
|
||||
*/
|
||||
export function clampPercent(value: number): number {
|
||||
if (!Number.isFinite(value)) return 0;
|
||||
return Math.max(0, Math.min(100, value));
|
||||
}
|
||||
Reference in new issue
Block a user