From 92e239d00157e379a3d238a53365dd6bd455faae Mon Sep 17 00:00:00 2001 From: Shubheksha Jalan Date: Tue, 11 Apr 2017 01:06:38 +0530 Subject: [PATCH] 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 Reviewed-By: Anna Henningsen Reviewed-By: James M Snell --- doc/api/querystring.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/api/querystring.md b/doc/api/querystring.md index 8b59b47087c945..00a1c164fd8b57 100644 --- a/doc/api/querystring.md +++ b/doc/api/querystring.md @@ -98,6 +98,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