diff --git a/doc/api/util.md b/doc/api/util.md index ea8bbd5e286887..576db37779fc30 100644 --- a/doc/api/util.md +++ b/doc/api/util.md @@ -1111,6 +1111,21 @@ doSomething[kCustomPromisifiedSymbol] = (foo) => { }; ``` +## `util.stripVTControlCharacters(str)` + + +* `str` {string} +* Returns: {string} + +Returns `str` with any ANSI escape codes removed. + +```js +console.log(util.stripVTControlCharacters('\u001B[4mvalue\u001B[0m')); +// Prints "value" +``` + ## Class: `util.TextDecoder`