Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parseNumbers returns NaN on empty strings. #700

Open
6farer opened this issue Feb 1, 2024 · 2 comments
Open

parseNumbers returns NaN on empty strings. #700

6farer opened this issue Feb 1, 2024 · 2 comments

Comments

@6farer
Copy link

6farer commented Feb 1, 2024

When use the preprocessor parseNumbers, it returns NaN for empty string values. Is this expected? I would prefer to leave the value as is (I'm parsing a large object).

isNaN('') === false however parseInt('') === NaN

If this is everyone's desired behaviour, please ignore my issue. If this isn't what people are expecting, I can submit a PR. I will see if there are any comments on this issue. In the meantime I will use my own preprocessor.

@Jzeemo
Copy link

Jzeemo commented Mar 20, 2024

I am having the same issue. I expected that it should return as an empty string.

@ovstetun
Copy link

I would expect to have an empty string in this case - will also use my own processor for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants