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: https://github.com/nodejs/node/pull/26792
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
dkundel 2019-03-19 17:45:00 -07:00 committed by Daniel Bevenius
parent b51a546488
commit 136c805b6e

View File

@ -5,7 +5,12 @@
The `process` object is a `global` that provides information about, and control
over, the current Node.js process. As a global, it is always available to
Node.js applications without using `require()`.
Node.js applications without using `require()`. It can also be explicitly
accessed using `require()`:
```js
const process = require('process');
```
## Process Events