-
Notifications
You must be signed in to change notification settings - Fork 30k
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
docs: update code examples for node:url
module
#38645
Conversation
Thanks for sending this, I'm not sure we want to do that: it raises questions such as "Why go for |
Because all other codes use |
// @aduh95 Added esm examples as request in #38651 (comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few comments:
- I feel it's more natural to use the named import for
fileURLToPath
instead 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?
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>
Landed in 42cceff, thanks for the contribution 🎉 |
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>
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>
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>
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>
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>
There are many things called
url
in this page includingurl
module,URL
instances, etc.The original example was not clear where these methods come from.