Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: improve description of urlObject.query #9625

Closed

Conversation

rahatarmanahmed
Copy link
Contributor

Checklist
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

doc

Description of change

There's a bit of a disconnect in the description of urlObject.query. It says it can be either an object or string, but doesn't explain the ambiguity. Added a sentence pointing to the option that determines this in url.parse().

Also fixed a missing parentheses.

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. url Issues and PRs related to the legacy built-in url module. labels Nov 15, 2016
@@ -115,8 +115,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:
everything *except* the leading ASCII question mark (`?`) ), or an object
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about we rephrase that first sentence to make it more concise and eliminate the nested parentheses:

The `query` property is either the query string without the leading question
mark (`?`) or an object returned by the [`querystring`][] module's `parse`
method.

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.
@rahatarmanahmed
Copy link
Contributor Author

I think that's a good idea. PR is updated w/ changes.

@targos
Copy link
Member

targos commented Nov 19, 2016

Landed in 8f05611. Thanks!

@targos targos closed this Nov 19, 2016
targos pushed a commit that referenced this pull request Nov 19, 2016
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: #9625
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
addaleax pushed a commit that referenced this pull request Nov 22, 2016
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: #9625
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
@rahatarmanahmed rahatarmanahmed deleted the docs-urlobject-query branch December 1, 2016 16:25
MylesBorins pushed a commit that referenced this pull request Dec 20, 2016
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: #9625
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
MylesBorins pushed a commit that referenced this pull request Dec 21, 2016
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: #9625
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
@MylesBorins MylesBorins mentioned this pull request Dec 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. url Issues and PRs related to the legacy built-in url module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants