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

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions doc/api/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -626,9 +626,11 @@ added: v8.9.0
-->

* `request` {string} The module path whose lookup paths are being retrieved.
* Returns: {Array}
* Returns: {Array|null}

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
Contributor

Choose a reason for hiding this comment

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

Maybe null -> `null`?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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
Contributor

Choose a reason for hiding this comment

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

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)

`fs`.

## The `module` Object
<!-- YAML
Expand Down