supports-color
Advanced tools
Comparing version 9.0.0 to 9.0.1
/* eslint-env browser */ | ||
function getChromeVersion() { | ||
const matches = /(Chrome|Chromium)\/(?<chromeVersion>\d+)\./.exec(navigator.userAgent); | ||
const isBlinkBasedBrowser = /\b(Chrome|Chromium)\//.test(navigator.userAgent); | ||
if (!matches) { | ||
return; | ||
} | ||
return Number.parseInt(matches.groups.chromeVersion, 10); | ||
} | ||
const colorSupport = getChromeVersion() >= 69 ? { | ||
const colorSupport = isBlinkBasedBrowser ? { | ||
level: 1, | ||
@@ -15,0 +7,0 @@ hasBasic: true, |
{ | ||
"name": "supports-color", | ||
"version": "9.0.0", | ||
"version": "9.0.1", | ||
"description": "Detect whether a terminal supports color", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
8677
134