From 6dd07726b9f7b141d8619c6f645ee5d3dc1a9f23 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Thu, 31 Mar 2022 20:14:44 -0700 Subject: [PATCH] doc: simplify recommendations in process.md Remove recommendation that has no explanation. Make the other recommendation less wordy. PR-URL: https://github.com/nodejs/node/pull/42556 Reviewed-By: Mestery Reviewed-By: Antoine du Hamel Reviewed-By: Benjamin Gruenbaum Reviewed-By: Akhil Marsonya --- doc/api/process.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/doc/api/process.md b/doc/api/process.md index 375867dcec7205..1dfe261a2ebfc7 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -7,8 +7,7 @@ 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'; @@ -1485,8 +1484,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';