Skip to content

Commit

Permalink
doc: include null as a return value for require.resolve.paths()
Browse files Browse the repository at this point in the history
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
  • Loading branch information
nephross committed Jan 24, 2018
1 parent e65a6e8 commit 3bc6f35
Showing 1 changed file with 4 additions and 2 deletions.
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
`fs`.

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

0 comments on commit 3bc6f35

Please sign in to comment.