-
-
Notifications
You must be signed in to change notification settings - Fork 735
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
Feature > Option to skip empty string at "qs.stringify()" #372
Comments
I am looking for this option as well, the vanity in me would like to see nice clean URLs 😆 |
please add this option. |
@phuocnelet it never disappeared because it never existed. |
@ljharb My bad, I was confused with other library... My bad again but it could be a great feature actually ! |
@motograter certainly we could add it - but we're not going to add features just because another library has it. What's the use case? Either way, i think #372 (comment) still summarizes the best approach here, so I'm going to close this in favor of those. |
@ljharb second and this strange logic , why empty array or object correct convert to "" , but when is string we parsed to "prop="
|
@motograter i'm not entirely clear what your comment is trying to get across. I do understand that if you want someone to be able to search for the empty string, the interface is tricky unless you force them to always write the quotes (or whatever delimiter). I'm not sure how this applies to qs, though, since via a custom encoder or decoder you can make whatever decisions you like there. |
@ljharb oh agree, thank you, i some fixes in my backend server example i have 5 filters, init values on client = empty strings, in future i some change on client and send to server and this initial string look like it , before i change any of filter
this is normal? |
Yes, an empty string for |
@ljharb do you think this feature still relevant? I could take a look soon. I needed this feature few weeks ago but ended up resolving on my side, so i believe it is relevant... |
@bjmvercelli #307 is still open. If you could elaborate on the use case, that'd help. |
The text was updated successfully, but these errors were encountered: