mirror of
https://github.com/iptv-org/iptv.git
synced 2025-05-10 17:10:04 -04:00
10 lines
234 B
TypeScript
10 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
|
|
}
|
|
}
|