mirror of
https://github.com/iptv-org/iptv.git
synced 2024-09-06 00:02:24 +02:00
11 lines
234 B
TypeScript
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
|
|
}
|
|
}
|