-
-
Notifications
You must be signed in to change notification settings - Fork 731
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
Skipping blank values at stringify #307
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm - "blank" isn't really a universal definition. Perhaps this would be better as a generic skip
option? It would take a function, be passed key and value, and return true
to skip. That way it could also subsume the skipNulls
option (it would throw if both were passed), and then you could define your own definition for what to skip.
We'd want to add the same option to both parse and stringify.
dist/qs.js
Outdated
@@ -308,6 +309,7 @@ var stringify = function stringify( // eslint-disable-line func-name-matching | |||
prefix, | |||
generateArrayPrefix, | |||
strictNullHandling, | |||
skipBlanks, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All changes made in this autogenerated file are lost; you'll need to change the files in lib
instead.
It makes sense and more suitable. I will give it a try asap |
@douglira have you had any time to update this PR? |
521a4df
to
01d7117
Compare
Codecov Report
@@ Coverage Diff @@
## master #307 +/- ##
=======================================
Coverage 99.85% 99.85%
=======================================
Files 8 8
Lines 1336 1347 +11
Branches 164 167 +3
=======================================
+ Hits 1334 1345 +11
Misses 2 2
Continue to review full report at Codecov.
|
No description provided.