@babel/code-frame
Advanced tools
Comparing version 8.0.0-alpha.13 to 8.0.0-alpha.14
@@ -6,6 +6,7 @@ import picocolors, { createColors } from 'picocolors'; | ||
function isColorSupported() { | ||
return typeof process === "object" && (process.env.FORCE_COLOR === "0" || process.env.FORCE_COLOR === "false") ? false : picocolors.isColorSupported; | ||
return (typeof process === "object" && (process.env.FORCE_COLOR === "0" || process.env.FORCE_COLOR === "false") ? false : picocolors.isColorSupported | ||
); | ||
} | ||
const compose = (f, g) => v => f(g(v)); | ||
function builDefs(colors) { | ||
function buildDefs(colors) { | ||
return { | ||
@@ -27,4 +28,4 @@ keyword: colors.cyan, | ||
} | ||
const defsOn = builDefs(createColors(true)); | ||
const defsOff = builDefs(createColors(false)); | ||
const defsOn = buildDefs(createColors(true)); | ||
const defsOff = buildDefs(createColors(false)); | ||
function getDefs(enabled) { | ||
@@ -31,0 +32,0 @@ return enabled ? defsOn : defsOff; |
{ | ||
"name": "@babel/code-frame", | ||
"version": "8.0.0-alpha.13", | ||
"version": "8.0.0-alpha.14", | ||
"description": "Generate errors that contain a code frame that point to source locations.", | ||
@@ -19,3 +19,3 @@ "author": "The Babel Team (https://babel.dev/team)", | ||
"dependencies": { | ||
"@babel/helper-validator-identifier": "^8.0.0-alpha.13", | ||
"@babel/helper-validator-identifier": "^8.0.0-alpha.14", | ||
"js-tokens": "^8.0.0", | ||
@@ -22,0 +22,0 @@ "picocolors": "^1.0.0" |
Sorry, the diff of this file is not supported yet
36522
297