You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
iptv/scripts/core/numberParser.ts

11 lines
234 B
TypeScript

export default class NumberParser {
async parse(number: string) {
const parsed = parseInt(number)
if (isNaN(parsed)) {
throw new Error('numberParser:parse() Input value is not a number')
}
return parsed
}
}