1
0

Security fixes

Co-Authored-By: dakkar <dakkar@thenautilus.net>
This commit is contained in:
Julia Johannesen
2025-04-27 13:05:09 -04:00
parent 9e13c375c5
commit 0bb4e57b0c
14 changed files with 56 additions and 26 deletions
+10
View File
@@ -0,0 +1,10 @@
/*
* SPDX-FileCopyrightText: dakkar and other Sharkey contributors
* SPDX-License-Identifier: AGPL-3.0-only
*/
export function clamp(value: number, min: number, max: number) {
if (value > max) return max;
if (value < min) return min;
return value;
}