Typescript migration:
* validation/validator.js
This commit is contained in:
parent
9e29eb924e
commit
5c0b5abf73
4 changed files with 123 additions and 98 deletions
server/utils
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue