diff options
author | Peter Dalgaard-Jensen <nephross.cortex@gmail.com> | 2018-01-24 16:54:14 +0100 |
---|---|---|
committer | Vse Mozhet Byt <vsemozhetbyt@gmail.com> | 2018-01-24 20:44:30 +0200 |
commit | 553d4ee57db12ef9f1c039985024c2e4f79fd815 (patch) | |
tree | 39dac8b301e184ada57a81122e28a5ad4867a172 /doc/api/modules.md | |
parent | 00687fb5044d9ab3361e445b7bf8949bf99994e2 (diff) | |
download | android-node-v8-553d4ee57db12ef9f1c039985024c2e4f79fd815.tar.gz android-node-v8-553d4ee57db12ef9f1c039985024c2e4f79fd815.tar.bz2 android-node-v8-553d4ee57db12ef9f1c039985024c2e4f79fd815.zip |
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>
Diffstat (limited to 'doc/api/modules.md')
-rw-r--r-- | doc/api/modules.md | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/api/modules.md b/doc/api/modules.md index 64048cebe8..157ec3b6f7 100644 --- a/doc/api/modules.md +++ b/doc/api/modules.md @@ -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 |