Skip to content

Commit ed5671f

Browse files
dario-piotrowicztargos
authored andcommitted
doc: update module.builtinModules sentence
updates the sentence saying that `module.builtinModule` only contains the modules that can be loaded without `node:` (since v23.5.0 also prefix-only modules are included in the list) PR-URL: #57089 Refs: #56185 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jordan Harband <ljharb@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent f4a82fd commit ed5671f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

doc/api/modules.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -511,9 +511,11 @@ by that name.
511511

512512
Some built-in modules are always preferentially loaded if their identifier is
513513
passed to `require()`. For instance, `require('http')` will always
514-
return the built-in HTTP module, even if there is a file by that name. The list
515-
of built-in modules that can be loaded without using the `node:` prefix is exposed
516-
in [`module.builtinModules`][], listed without the prefix.
514+
return the built-in HTTP module, even if there is a file by that name.
515+
516+
The list of all the built-in modules can be retrieved from [`module.builtinModules`][].
517+
The modules being all listed without the `node:` prefix, except those that mandate such
518+
prefix (as explained in the next section).
517519

518520
### Built-in modules with mandatory `node:` prefix
519521

0 commit comments

Comments
 (0)