@@ -100,10 +100,11 @@ function lazyAbortController() {
|
100 | 100 | let internalDeepEqual; |
101 | 101 | |
102 | 102 | /** |
103 | | - * @param {string} code |
| 103 | + * @param {string} [code] |
104 | 104 | * @returns {string} |
105 | 105 | */ |
106 | 106 | function escapeStyleCode(code) { |
| 107 | +if (code === undefined) return ''; |
107 | 108 | return `\u001b[${code}m`; |
108 | 109 | } |
109 | 110 | |
@@ -139,6 +140,7 @@ function styleText(format, text, { validateStream = true, stream = process.stdou
|
139 | 140 | let left = ''; |
140 | 141 | let right = ''; |
141 | 142 | for (const key of formatArray) { |
| 143 | +if (key === 'none') continue; |
142 | 144 | const formatCodes = inspect.colors[key]; |
143 | 145 | // If the format is not a valid style, throw an error |
144 | 146 | if (formatCodes == null) { |
|