Typescript migration:

* validation/validator.js
This commit is contained in:
baldo 2020-04-08 22:45:21 +02:00
parent 9e29eb924e
commit 5c0b5abf73
4 changed files with 123 additions and 98 deletions
server/utils

View file

@ -17,7 +17,7 @@ export function normalizeMac (mac: string): string {
return macParts.join(':');
}
export function parseInt (str: string): number | undefined {
export function parseInteger (str: string): number | undefined {
const parsed = _.parseInt(str, 10);
return parsed.toString() === str ? parsed : undefined;
}