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

Improving the documentation for url.format() #18887

Closed
zeke opened this issue Feb 20, 2018 · 1 comment
Closed

Improving the documentation for url.format() #18887

zeke opened this issue Feb 20, 2018 · 1 comment
Labels
doc Issues and PRs related to the documentations.

Comments

@zeke
Copy link
Contributor

zeke commented Feb 20, 2018

  • Version: All
  • Platform: All
  • Subsystem: All

I've noticed that the documentation for the url.format() method has becoming a long-winded story of "If this condition is met, then this happens, else this other thing happens, unless something something."

I'm all for leaving this detailed explanation of the method's behavior intact, but I think it would also be immensely useful to have some example code to illustrate the common case. Something like this:

url.format({
  protocol: 'https',
  hostname: `en.wiktionary.org`,
  pathname: '/w/api.php',
  query: {
    action: 'query',
    format: 'json',
    prop: 'extracts',
    titles: 'orthogonal'
  }
})

I'm happy to open a pull request for this, but wanted to check first to see if a change like this would be welcomed.

@Trott
Copy link
Member

Trott commented Feb 20, 2018

Sounds good to me, although doc PRs do tend to attract a lot of comments/requests for changes. As long as you're prepared to be patient with the process, 👍!

@mmarchini mmarchini added the doc Issues and PRs related to the documentations. label Feb 21, 2018
addaleax pushed a commit to addaleax/node that referenced this issue Mar 5, 2018
PR-URL: nodejs#18888
Fixes: nodejs#18887
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Vse Mozhet Byt <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Roman Reiss <[email protected]>
Reviewed-By: Daijiro Wachi <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
MayaLekova pushed a commit to MayaLekova/node that referenced this issue May 8, 2018
PR-URL: nodejs#18888
Fixes: nodejs#18887
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Vse Mozhet Byt <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Roman Reiss <[email protected]>
Reviewed-By: Daijiro Wachi <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
jasnell pushed a commit to jasnell/node that referenced this issue Aug 17, 2018
PR-URL: nodejs#18888
Fixes: nodejs#18887
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Vse Mozhet Byt <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Roman Reiss <[email protected]>
Reviewed-By: Daijiro Wachi <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
MylesBorins pushed a commit that referenced this issue Sep 6, 2018
Backport-PR-URL: #22380
PR-URL: #18888
Fixes: #18887
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Vse Mozhet Byt <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Roman Reiss <[email protected]>
Reviewed-By: Daijiro Wachi <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
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.
Projects
None yet
Development

No branches or pull requests

3 participants