Skip to content

Commit f1b951f

Browse files
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 <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Jordan Harband <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent 610e474 commit f1b951f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

doc/api/modules.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -516,9 +516,11 @@ by that name.
516516

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

523525
### Built-in modules with mandatory `node:` prefix
524526

0 commit comments

Comments
 (0)