Added helper file 'checkvars'

In this file comes the code to check the input from the User
e.g. is `id` an integer
This commit is contained in:
Rudi committed 2026-08-27 13:26:20 +02:00
1 parent 66c9dc28fc
commit e1eaea0f17
1 file changed
+12
+12
View File
@@ -0,0 +1,12 @@
export function parseInt(rawInteger){
const integer = Number.parseInt(rawInteger);
if (Number.isNaN(integer) || !Number.isInteger(integer)) {
return null;
}
else {
return integer;
}
}