Content-Length: 259374 | pFad | https://github.com/nodejs/node/commit/627f2997e3

1C doc: fix typo in example code for util.styleText · nodejs/node@627f299 · GitHub
Skip to content

Commit 627f299

Browse files
rmehnermarco-ippolito
authored andcommitted
doc: fix typo in example code for util.styleText
Code shows how to style `errorMessage`, but then only logs out `successMessage` twice. This might trip people up when copying the code. PR-URL: #56720 Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
1 parent e3b69e5 commit 627f299

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/api/util.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1837,7 +1837,7 @@ const errorMessage = styleText(
18371837
// Validate if process.stderr has TTY
18381838
{ stream: stderr },
18391839
);
1840-
console.error(successMessage);
1840+
console.error(errorMessage);
18411841
```
18421842
18431843
```cjs

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/nodejs/node/commit/627f2997e3

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy