From 243dfee9d90b15c53827373ac8fbad42cbde2609 Mon Sep 17 00:00:00 2001 From: Deokjin Kim Date: Sun, 26 Jan 2025 19:53:13 +0900 Subject: [PATCH] doc: fix typo in cjs example of `util.styleText` `errorMessage` needs to be printed instead of `successMessage` in console.error(). ESM example is only fixed in previous PR. Refs: https://github.com/nodejs/node/pull/56720 --- doc/api/util.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/util.md b/doc/api/util.md index 958a49977e1a17..f6a57f133ea1ff 100644 --- a/doc/api/util.md +++ b/doc/api/util.md @@ -1988,7 +1988,7 @@ const errorMessage = styleText( // Validate if process.stderr has TTY { stream: stderr }, ); -console.error(successMessage); +console.error(errorMessage); ``` `util.inspect.colors` also provides text formats such as `italic`, and