@babel/highlight
Advanced tools
Comparing version 7.12.13 to 7.13.8
@@ -106,16 +106,10 @@ "use strict"; | ||
function shouldHighlight(options) { | ||
return _chalk.default.supportsColor || options.forceColor; | ||
return !!_chalk.default.supportsColor || options.forceColor; | ||
} | ||
function getChalk(options) { | ||
let chalk = _chalk.default; | ||
if (options.forceColor) { | ||
chalk = new _chalk.default.constructor({ | ||
enabled: true, | ||
level: 1 | ||
}); | ||
} | ||
return chalk; | ||
return options.forceColor ? new _chalk.default.constructor({ | ||
enabled: true, | ||
level: 1 | ||
}) : _chalk.default; | ||
} | ||
@@ -122,0 +116,0 @@ |
{ | ||
"name": "@babel/highlight", | ||
"version": "7.12.13", | ||
"version": "7.13.8", | ||
"description": "Syntax highlight JavaScript strings for output in terminals.", | ||
@@ -23,4 +23,5 @@ "author": "suchipi <me@suchipi.com>", | ||
"devDependencies": { | ||
"@types/chalk": "^2.0.0", | ||
"strip-ansi": "^4.0.0" | ||
} | ||
} |
4
5947
2
100