Files
psalmtafel-webservice/lib/helper/checkvar.ts
Rudi e1eaea0f17 Added helper file 'checkvars'
In this file comes the code to check the input from the User
e.g. is `id` an integer
2026-08-27 13:26:20 +02:00

13 lines
223 B
TypeScript

export function parseInt(rawInteger){
const integer = Number.parseInt(rawInteger);
if (Number.isNaN(integer) || !Number.isInteger(integer)) {
return null;
}
else {
return integer;
}
}