globalize
globalize copied to clipboard
parseNumber not returning NaN for trailing decimal
I'm using latest version.
Trying to parse a number onKeyUp in en locale.
Globalize("en").numberParser()("123.") // returns the value 123
Shouldn't this return NaN?
This is expected (since some use cases depend on this feature [1]) thought it could be revisited if there's strong argument against it.
1: Incrementally parsing a number input (as typed).