doc: fix return value for require.resolve.paths()

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: https://github.com/nodejs/node/pull/18350
Fixes: https://github.com/nodejs/node/issues/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 commit is contained in:
Peter Dalgaard-Jensen authored and Evan Lucas committed 2018-01-30 14:25:36 -06:00
1 parent 7d27228e90
commit 4d3121b6ed
1 file changed
+4 -2
+4 -2
View File
@@ -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