Skip to content
This repository was archived by the owner on May 1, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants