Skip to content

Commit 3e1972e

Browse files
committed
doc: document process.moduleLoadList
process.moduleLoadList was added in the early days but never documented Fixes: #41233
1 parent 650f51f commit 3e1972e

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

doc/api/process.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2858,6 +2858,35 @@ console.log(memoryUsage.rss());
28582858
// 35655680
28592859
```
28602860
2861+
## `process.moduleLoadList`
2862+
2863+
<!-- YAML
2864+
added: v0.5.3
2865+
changes:
2866+
- version: REPLACEME
2867+
pr-url: https://github.com/nodejs/node/pull/61276
2868+
description: Now a copy instead of the internal list itself.
2869+
-->
2870+
2871+
* Returns: {string\[]}
2872+
2873+
The `process.moduleLoadList` property returns an array of internal bindings and core modules that
2874+
were loaded during the current Node.js process execution.
2875+
2876+
```mjs
2877+
import { moduleLoadList } from 'node:process';
2878+
2879+
console.log(moduleLoadList);
2880+
// ['Internal Binding builtins', 'Internal Binding module_wrap', 'Internal Binding errors', ...]
2881+
```
2882+
2883+
```cjs
2884+
const { moduleLoadList } = require('node:process');
2885+
2886+
console.log(moduleLoadList);
2887+
// ['Internal Binding builtins', 'Internal Binding module_wrap', 'Internal Binding errors', ...]
2888+
```
2889+
28612890
## `process.nextTick(callback[, ...args])`
28622891
28632892
<!-- YAML

0 commit comments

Comments
 (0)