summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authordkundel <dominik.kundel@gmail.com>2019-03-19 17:45:00 -0700
committerDaniel Bevenius <daniel.bevenius@gmail.com>2019-03-26 07:17:15 +0100
commit136c805b6e4dbcb8996ecad7a7d882fbf83e3e7c (patch)
tree350c1cbaf061dfd14b1fc2db6c937aec533df042 /doc
parentb51a546488698660f00aa5221bbe908d6e01f4e0 (diff)
downloadandroid-node-v8-136c805b6e4dbcb8996ecad7a7d882fbf83e3e7c.tar.gz
android-node-v8-136c805b6e4dbcb8996ecad7a7d882fbf83e3e7c.tar.bz2
android-node-v8-136c805b6e4dbcb8996ecad7a7d882fbf83e3e7c.zip
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>
Diffstat (limited to 'doc')
-rw-r--r--doc/api/process.md7
1 files changed, 6 insertions, 1 deletions
diff --git a/doc/api/process.md b/doc/api/process.md
index 2aaf11105a..27ba6db319 100644
--- a/doc/api/process.md
+++ b/doc/api/process.md
@@ -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