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: https://github.com/nodejs/node/pull/12313
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Shubheksha Jalan 2017-04-11 01:06:38 +05:30 committed by Anna Henningsen
parent 508c8ce864
commit b07c72b8be
No known key found for this signature in database
GPG Key ID: D8B9F5AEAE84E4CF

View File

@ -101,6 +101,10 @@ added: v0.1.25
The `querystring.stringify()` method produces a URL query string from a The `querystring.stringify()` method produces a URL query string from a
given `obj` by iterating through the object's "own properties". 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: For example:
```js ```js