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

Feat: strict number parsing #24

Merged
merged 2 commits into from
May 10, 2016
Merged

Conversation

Starefossen
Copy link
Contributor

Stricter number parsing to prevent parsing mixed strings as numbers.

Before:

qs.parseStringVal('123abc'); // 123
qs.parseStringVal('123abc123'); // 123

After:

qs.parseStringVal('123abc'); // "123abc"
qs.parseStringVal('123abc123'); // "123abc123"

Hans Kristian Flaatten added 2 commits May 7, 2016 00:42
This prevents strings with mixed numbers and strings to be parsed as numbers if
the string begins with a number. `123abc` will now evaluate to the string
instead of `123` with the previous parser.
@Starefossen Starefossen merged commit 75c7c5e into master May 10, 2016
@Starefossen Starefossen deleted the feat/strict-number-parsing branch May 10, 2016 19:39
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

Successfully merging this pull request may close these issues.

1 participant