We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 003511d commit bacd1a7Copy full SHA for bacd1a7
lib/internal/util/inspect.js
@@ -3036,6 +3036,9 @@ if (internalBinding('config').hasIntl) {
3036
function stripVTControlCharacters(str) {
3037
validateString(str, 'str');
3038
3039
+ // Short-circuit: all ANSI escape sequences start with either
3040
+ // ESC (\u001B, 7-bit) or CSI (\u009B, 8-bit) introducer.
3041
+ // If neither is present, the string has no VT control characters.
3042
if (!StringPrototypeIncludes(str, '\u001B') &&
3043
!StringPrototypeIncludes(str, '\u009B'))
3044
return str;
0 commit comments