Skip to content

Commit 0880952

Browse files
Namchee43081j
andauthored
docs: add note about stripVTControlCharacters behavior (#226)
* docs: add NodeJS version compatility to stripVTControlCharacters * chore: remove volta pin * docs: add more emphasis on ANSI part --------- Co-authored-by: James Garbutt <43081j@users.noreply.github.com>
1 parent cec9b4f commit 0880952

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

docs/modules/strip-ansi.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ console.log(stripAnsi('\u001B[4me18e\u001B[0m')) // [!code --]
1616
console.log(stripVTControlCharacters('\u001B[4me18e\u001B[0m')) // [!code ++]
1717
```
1818

19+
> [!NOTE]
20+
> Due to [a bug](https://github.com/nodejs/node/issues/53697), in older Node versions this utility doesn't handle ANSI hyperlinks correctly. This behavior has been fixed as of NodeJS v22.10.
21+
1922
## Deno
2023

2124
Deno implements the Node `util` API, and also provides [`util.stripVTControlCharacters`](https://docs.deno.com/api/node/util/~/stripVTControlCharacters). The usage is identical:

0 commit comments

Comments
 (0)