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 <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
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 <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
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 <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
MylesBorins pushed a commit that referenced this issue Sep 6, 2018
Backport-PR-URL: #22380
PR-URL: #18888
Fixes: #18887
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
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