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: #12313
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
shubheksha authored and MylesBorins committed May 18, 2017
1 parent 945dcde commit 929ca30
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 929ca30

Please sign in to comment.