Skip to content

Commit 92e239d

Browse files
shubhekshaevanlucas
authored andcommitted
doc: add info about serializable types
querystring.stringify() doesn't serialize some values. Explicitly mention what values are serialized in the docs. Add what happens when another data type is passed to `querystring.stringify()` besides the ones that can be correctly parsed PR-URL: #12313 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 5c57fea commit 92e239d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

doc/api/querystring.md

+4
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ added: v0.1.25
9898
The `querystring.stringify()` method produces a URL query string from a
9999
given `obj` by iterating through the object's "own properties".
100100

101+
It serializes the following types of values passed in `obj`:
102+
{string|number|boolean|string[]|number[]|boolean[]}
103+
Any other input values will be coerced to empty strings.
104+
101105
For example:
102106

103107
```js

0 commit comments

Comments
 (0)