Skip to content

Commit b07c72b

Browse files
shubhekshaaddaleax
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: nodejs#12313 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 508c8ce commit b07c72b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

doc/api/querystring.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ added: v0.1.25
101101
The `querystring.stringify()` method produces a URL query string from a
102102
given `obj` by iterating through the object's "own properties".
103103

104+
It serializes the following types of values passed in `obj`:
105+
{string|number|boolean|string[]|number[]|boolean[]}
106+
Any other input values will be coerced to empty strings.
107+
104108
For example:
105109

106110
```js

0 commit comments

Comments
 (0)