The raw input
isNumberString("1") >>
{
valid: true,
parsed: 1,
};
isNumberString("") >>
{
valid: false,
error: 'Not a number: ""',
};
isNumberString("NaN") >>
{
valid: false,
error: 'Not a number: "NaN"',
};
isNumberString("Infinity") >>
{
valid: false,
error: 'Not a number: "Infinity"',
};
Validate a number string