Comments (4)
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=
from qs.
@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: ""}
);
from qs.
I made a pull request for this: #85
from qs.
Closed via #85
from qs.
Related Issues (20)
- Parsing the stringify result would lead to a different object HOT 1
- qs parse is not letting app load on production when imported from index.tsx HOT 1
- Feature request: export another endpoint that doesn't depend on function-bind and possibly other polyfills HOT 10
- Does not work in NextJS edge middleware HOT 3
- Stringify method with format: "RFC1738" does not encode parentheses -> ( ) HOT 3
- I'm appreciate with this library, however my new project use python. Are there any same packages in Python? HOT 1
- How can you keep the square brackets when using arrayFormat: comma HOT 4
- Add required key and type checking HOT 2
- qs.parse return different while the query is in different position HOT 1
- Problem with stringify in Vite targeting ES2020 HOT 3
- Trouble with commaRoundTrip HOT 1
- Problem with arrayFormat: "comma" HOT 2
- Exclude the value of a certain key, from getting encoded HOT 9
- Cannot use qs with Vite bundler HOT 3
- Incorrect parsing of nested params with closing square bracket ] in property name
- [spam]
- A question about CVE-2022-24999 HOT 1
- Top-level array? HOT 5
- feature request : add exclude specific keys to options array HOT 3
- Is `decodeDotInKeys` meant to be disabled by default? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qs.