FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

doc: include null as a return value for require.resolve.paths() by nephross · Pull Request #18350 · nodejs/node · GitHub

/ node Public

doc: include null as a return value for require.resolve.paths() - #18350

Closed
nephross wants to merge 1 commit into
nodejs:masterfrom
nephross:doc/modules/requireResolve
Closed

doc: include null as a return value for require.resolve.paths()#18350
nephross wants to merge 1 commit into
nodejs:masterfrom
nephross:doc/modules/requireResolve

Conversation

Copy link
Copy Markdown
Contributor

Update documentation of modules.md for require.resolve.paths()
to include the possibillity of null as a return value if
the request string given matches a core module name.

Fixes: #18230

Checklist
Affected core subsystem(s)

doc

Update documentation of modules.md for require.resolve.paths()
to include the possibillity of null as a return value if
the request string given matches a core module name.

Fixes: nodejs#18230
nodejs-github-bot added doc Issues and PRs related to the documentations. module Issues and PRs related to the module subsystem. labels Jan 24, 2018
Comment thread doc/api/modules.md

Returns an array containing the paths searched during resolution of `request`.
Returns an array containing the paths searched during resolution of `request` or
null if the `request` string references a core module, for example `http` or

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Maybe null -> `null`?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

should the mention of array and string also be highlighted then? I viewed all of those as the same, and since array and string were not highlighted in the previous version, I used that as a guide. Can for sure give them the treatment if it's considered needed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I am also not sure: array and string may have a general meaning, while null is more strict. But let us wait what others think. I am OK with the current form as well)

Copy link
Copy Markdown
Contributor

vsemozhetbyt added the fast-track PRs that do not need to wait for 48 hours to land. label Jan 24, 2018
vsemozhetbyt pushed a commit that referenced this pull request Jan 24, 2018
Update documentation of modules.md for require.resolve.paths()
to include the possibillity of null as a return value if
the request string given matches a core module name.

PR-URL: #18350
Fixes: #18230
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>

Copy link
Copy Markdown
Contributor

Landed in 553d4ee

Thank you, @nephross!

Copy link
Copy Markdown
Contributor Author

@vsemozhetbyt Thank you too for the review and helping hands both on this and the other PR:)

evanlucas pushed a commit that referenced this pull request Jan 30, 2018
Update documentation of modules.md for require.resolve.paths()
to include the possibillity of null as a return value if
the request string given matches a core module name.

PR-URL: #18350
Fixes: #18230
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Feb 27, 2018
Update documentation of modules.md for require.resolve.paths()
to include the possibillity of null as a return value if
the request string given matches a core module name.

PR-URL: #18350
Fixes: #18230
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MayaLekova pushed a commit to MayaLekova/node that referenced this pull request May 8, 2018
Update documentation of modules.md for require.resolve.paths()
to include the possibillity of null as a return value if
the request string given matches a core module name.

PR-URL: nodejs#18350
Fixes: nodejs#18230
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@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

Labels

doc Issues and PRs related to the documentations. fast-track PRs that do not need to wait for 48 hours to land. module Issues and PRs related to the module subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

require.resolve.paths(${built-in module id}) returns null

6 participants


Back | FazBrowse Home | New Git URL