-
-
Notifications
You must be signed in to change notification settings - Fork 34.3k
doc: document process.moduleLoadList #61276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2858,6 +2858,31 @@ console.log(memoryUsage.rss()); | |
| // 35655680 | ||
| ``` | ||
|
|
||
| ## `process.moduleLoadList` | ||
|
|
||
| <!-- YAML | ||
| added: v0.5.3 | ||
| --> | ||
|
|
||
| * Type: {string\[]} | ||
|
|
||
| The `process.moduleLoadList` property returns an array of internal bindings and core modules that | ||
| were loaded during the current Node.js process execution. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Small wording nit: "process execution" feels slightly redundant. "during the current process" might be cleaner.
|
||
|
|
||
| ```mjs | ||
| import { moduleLoadList } from 'node:process'; | ||
|
|
||
| console.log(moduleLoadList); | ||
| // ['Internal Binding builtins', 'Internal Binding module_wrap', 'Internal Binding errors', ...] | ||
|
||
| ``` | ||
|
|
||
| ```cjs | ||
| const { moduleLoadList } = require('node:process'); | ||
|
|
||
| console.log(moduleLoadList); | ||
| // ['Internal Binding builtins', 'Internal Binding module_wrap', 'Internal Binding errors', ...] | ||
| ``` | ||
|
|
||
| ## `process.nextTick(callback[, ...args])` | ||
|
|
||
| <!-- YAML | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Since the documentation text specifically refers to
process.moduleLoadList, should the example useprocess.moduleLoadListdirectly instead of destructuring?