We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
a
If no = is given for a flag, it should be handled as boolean (true).
=
true
For example:
Qs.parse('a&b=', {allowBoolean: true}); // {a: true, b: ''}
without the allowBoolean option, it should not do this conversion (as it does today):
allowBoolean
Qs.parse('a&b='); // {a: '', b: ''}
The text was updated successfully, but these errors were encountered:
I would argue that the other way around, giving a null as value for a key, should generate a querystring value without the =.
Qs.stringify({a: null, b: "test"}); // ?a&b=test
Empty string could still behave as it is doing right now:
Qs.stringify({a: null, b: "test", c: ""}); // ?a&b=test&c=
Sorry, something went wrong.
@pierot That makes a lot of sense!
Else the following assertion fails:
assert.deepEqual( Qs.parse(Qs.stringify({a: null, b: "test", c: ""})), // a=&b=test&c= {a: null, b: "test", c: ""} // {a: "", b: "test", c: ""} );
I made a pull request for this: #85
Closed via #85
strictNullHandling
nlf
No branches or pull requests
If no
=
is given for a flag, it should be handled as boolean (true
).For example:
without the
allowBoolean
option, it should not do this conversion (as it does today):The text was updated successfully, but these errors were encountered: