-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
Documentation for __dirname is incorrect #13953
Comments
agreed, though the docs try to clarify:
https://nodejs.org/api/globals.html#globals_dirname so maybe the category "Globals" might be somewhat wrong. |
I think |
I think it makes sense to move the documentation for those things to https://nodejs.org/api/modules.html#modules_the_module_wrapper, but I'd add a small section in the Globals documentation about these module specific variables, and link to the real docs. |
@cjihrig I fear that might not be noticeable enough. To me, that section sounds like it is more of a technical explanation of how node executes modules. What do you think about adding a section ("The module scope") between "The module wrapper" and "The module object"? Or, maybe, rename "The module wrapper" to "The module scope" and move the variables there. I could PR this later. |
I don't have strong feelings. As long as each entry has it's own linkable subsection and a link at the top of the page, the discoverability is going to be the same. |
PR-URL: nodejs#13962 Fixes: nodejs#13953 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
In the documentation about Global Objects
__dirname
is listed as a global object.In reality it is not.
I would suggest correcting the documentation to represent this.
The text was updated successfully, but these errors were encountered: