Skip to content

Commit

Permalink
doc: simplify recommendations in process.md
Browse files Browse the repository at this point in the history
Remove recommendation that has no explanation. Make the other
recommendation less wordy.

PR-URL: #42556
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
  • Loading branch information
Trott committed Apr 3, 2022
1 parent 5618851 commit b07dc4d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions doc/api/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
<!-- source_link=lib/process.js -->

The `process` object provides information about, and control over, the current
Node.js process. While it is available as a global, it is recommended to
explicitly access it via require or import:
Node.js process.

```mjs
import process from 'process';
Expand Down Expand Up @@ -1487,8 +1486,7 @@ The following additional handling is implemented if the warning `type` is
### Avoiding duplicate warnings
As a best practice, warnings should be emitted only once per process. To do
so, it is recommended to place the `emitWarning()` behind a simple boolean
flag as illustrated in the example below:
so, place the `emitWarning()` behind a boolean.
```mjs
import { emitWarning } from 'process';
Expand Down

0 comments on commit b07dc4d

Please sign in to comment.