Skip to content

Commit 14cc4f2

Browse files
dkundeltargos
authored andcommitted
doc: add option to require 'process' to api docs
It is possible to require the 'process' module and with the upcoming support for ES Modules, importing 'process' might be the more favorable way for developers. This commit adds that option to the documentation. PR-URL: #26792 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent 5f3b850 commit 14cc4f2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

doc/api/process.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@
55

66
The `process` object is a `global` that provides information about, and control
77
over, the current Node.js process. As a global, it is always available to
8-
Node.js applications without using `require()`.
8+
Node.js applications without using `require()`. It can also be explicitly
9+
accessed using `require()`:
10+
11+
```js
12+
const process = require('process');
13+
```
914

1015
## Process Events
1116

0 commit comments

Comments
 (0)