mirror of https://github.com/iptv-org/iptv
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.
11 lines
234 B
TypeScript
11 lines
234 B
TypeScript
1 year ago
|
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
|
||
|
}
|
||
|
}
|