[libraryNameWithSpacesAndUpperCases] • Docs
[libraryNameWithSpacesAndUpperCases] / isNumberParseable
isNumberParseable(
value
):value is NumberParseable
Check if value is parseable to number.
• value: unknown
An unknown
value to be checked.
value is NumberParseable
isNumberParseable('AAAA');
//=> false
isNumberParseable('100');
//=> true
if (!isNumberParseable(value))
throw new Error('Value can\'t be parseable to `Number`.')
return Number(value);