From cd3b91bc4e10602d9a17f898e586dd6b8e81a10d Mon Sep 17 00:00:00 2001 From: Rahat Ahmed Date: Tue, 15 Nov 2016 13:56:03 -0600 Subject: [PATCH] doc: improve description of urlObject.query MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The description of urlObject.query is ambiguous about when it's an object vs when it's a string. Added a sentence pointing to the option that determines this in url.parse(). Also fixed the missing parentheses in the first sentence by rewording it to avoid nested parentheses. PR-URL: https://github.com/nodejs/node/pull/9625 Reviewed-By: Rich Trott Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Michaƫl Zasso --- doc/api/url.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/api/url.md b/doc/api/url.md index 522c5396d900dc..6d573b4b910f27 100644 --- a/doc/api/url.md +++ b/doc/api/url.md @@ -114,9 +114,10 @@ No decoding of the `path` is performed. ### urlObject.query -The `query` property is either the "params" portion of the query string ( -everything *except* the leading ASCII question mark (`?`), or an object -returned by the [`querystring`][] module's `parse()` method: +The `query` property is either the query string without the leading ASCII +question mark (`?`), or an object returned by the [`querystring`][] module's +`parse()` method. Whether the `query` property is a string or object is +determined by the `parseQueryString` argument passed to `url.parse()`. For example: `'query=string'` or `{'query': 'string'}`