Skip to content

Commit

Permalink
doc: add info about serializable types
Browse files Browse the repository at this point in the history
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/node#12313
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
shubheksha authored and andrew749 committed Jul 19, 2017
1 parent 4457ccf commit 92b8f9a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions doc/api/querystring.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ added: v0.1.25
The `querystring.stringify()` method produces a URL query string from a
given `obj` by iterating through the object's "own properties".

It serializes the following types of values passed in `obj`:
{string|number|boolean|string[]|number[]|boolean[]}
Any other input values will be coerced to empty strings.

For example:

```js
Expand Down

0 comments on commit 92b8f9a

Please sign in to comment.