From 3ed323fbb9008b58c5b5a8760c765126e79ed6d6 Mon Sep 17 00:00:00 2001 From: Shubheksha Jalan Date: Tue, 11 Apr 2017 01:06:38 +0530 Subject: [PATCH 1/3] docs: add info about serializable types querystring.stringify() doesn't serialize some values. Explicitly mention what values are serialized in the docs. --- doc/api/querystring.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/api/querystring.md b/doc/api/querystring.md index c3ee69c6a8e224..155e095f2bc249 100644 --- a/doc/api/querystring.md +++ b/doc/api/querystring.md @@ -101,6 +101,9 @@ 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". +This method searializes the following types of values passed in `obj`: strings, +finite numbers, booleans and arrays of the aforementioned types. + For example: ```js From 31fca1cb0d66d164cee24b12d0a5c7aa8da5fe59 Mon Sep 17 00:00:00 2001 From: Shubheksha Jalan Date: Tue, 11 Apr 2017 01:51:00 +0530 Subject: [PATCH 2/3] doc: add info about other data types Fix typo. Add what happens when another data type is passed to `querystring.stringify()` besides the ones that can be correctly parsed --- doc/api/querystring.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/api/querystring.md b/doc/api/querystring.md index 155e095f2bc249..83beccbda07700 100644 --- a/doc/api/querystring.md +++ b/doc/api/querystring.md @@ -101,8 +101,9 @@ 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". -This method searializes the following types of values passed in `obj`: strings, +This method serializes the following types of values passed in `obj`: strings, finite numbers, booleans and arrays of the aforementioned types. +Any other input values will be coerced to empty strings For example: From fec24ecbde17864a23271bdd53079a7aa392e33d Mon Sep 17 00:00:00 2001 From: Shubheksha Jalan Date: Tue, 11 Apr 2017 23:36:41 +0530 Subject: [PATCH 3/3] doc: uses {} to link to mdn docs for types --- doc/api/querystring.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/api/querystring.md b/doc/api/querystring.md index 83beccbda07700..9ec11ac9025ba3 100644 --- a/doc/api/querystring.md +++ b/doc/api/querystring.md @@ -101,9 +101,9 @@ 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". -This method serializes the following types of values passed in `obj`: strings, -finite numbers, booleans and arrays of the aforementioned types. -Any other input values will be coerced to empty strings +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: