docs: update code examples for node:url module#38645
Merged
aduh95 merged 1 commit intonodejs:masterfrom May 19, 2021
fisker:url-docs
Merged
docs: update code examples for node:url module#38645aduh95 merged 1 commit intonodejs:masterfrom fisker:url-docs
node:url module#38645aduh95 merged 1 commit intonodejs:masterfrom
fisker:url-docs
Conversation
Contributor
|
Thanks for sending this, I'm not sure we want to do that: it raises questions such as "Why go for |
Contributor
Author
Because all other codes use |
Contributor
Author
|
// @aduh95 Added esm examples as request in #38651 (comment) |
aduh95
reviewed
May 19, 2021
Contributor
aduh95
left a comment
There was a problem hiding this comment.
A few comments:
- I feel it's more natural to use the named import for
fileURLToPathinstead ofurl.fileURLToPath, but I reckon it's a personal taste and I don't feel strongly about it. - I'm not sure we want to update the legacy section with ESM examples, this section of the docs is there for maintainers of legacy code base which would be written in CJS. wdyt?
aduh95
reviewed
May 19, 2021
aduh95
approved these changes
May 19, 2021
jasnell
approved these changes
May 19, 2021
There are many things called `url` in this page including `url` module, `URL` instances, etc. The original example was not clear where these methods come from. PR-URL: #38645 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Contributor
|
Landed in 42cceff, thanks for the contribution 🎉 |
danielleadams
pushed a commit
that referenced
this pull request
May 31, 2021
There are many things called `url` in this page including `url` module, `URL` instances, etc. The original example was not clear where these methods come from. PR-URL: #38645 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Merged
richardlau
pushed a commit
that referenced
this pull request
Jul 16, 2021
There are many things called `url` in this page including `url` module, `URL` instances, etc. The original example was not clear where these methods come from. PR-URL: #38645 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
richardlau
pushed a commit
that referenced
this pull request
Jul 19, 2021
There are many things called `url` in this page including `url` module, `URL` instances, etc. The original example was not clear where these methods come from. PR-URL: #38645 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
richardlau
pushed a commit
that referenced
this pull request
Jul 20, 2021
There are many things called `url` in this page including `url` module, `URL` instances, etc. The original example was not clear where these methods come from. PR-URL: #38645 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Merged
foxxyz
pushed a commit
to foxxyz/node
that referenced
this pull request
Oct 18, 2021
There are many things called `url` in this page including `url` module, `URL` instances, etc. The original example was not clear where these methods come from. PR-URL: nodejs#38645 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There are many things called
urlin this page includingurlmodule,URLinstances, etc.The original example was not clear where these methods come from.