1
0
mirror of https://github.com/iptv-org/iptv.git synced 2025-06-18 03:58:04 +08:00
iptv/scripts/core/numberParser.ts
2023-09-15 18:40:35 +03:00

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
}
}