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 <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
shubheksha authored and addaleax committed Apr 14, 2017
1 parent 508c8ce commit b07c72b
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 @@ -101,6 +101,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 b07c72b

Please sign in to comment.