/* eslint-env browser */

function getChromeVersion() {
	const matches = /(Chrome|Chromium)\/(?<chromeVersion>\d+)\./.exec(navigator.userAgent);

	if (!matches) {
		return;
	}

	return Number.parseInt(matches.groups.chromeVersion, 10);
}

const colorSupport = getChromeVersion() >= 69 ? {
	level: 1,
	hasBasic: true,
	has256: false,
	has16m: false
} : false;

const supportsColor = {
	stdout: colorSupport,
	stderr: colorSupport
};

export default supportsColor;

@@ -23,56 +23,39 @@
 */%0A%0A
-function getChromeVersion() %7B%0A%09const matches
+const isBlinkBasedBrowser
  = /
+%5Cb
 (Chr
@@ -73,199 +73,78 @@
 m)%5C/
-(?%3CchromeVersion%3E%5Cd+)%5C./.exec(navigator.userAgent);%0A%0A%09if (!matches) %7B%0A%09%09return;%0A%09%7D%0A%0A%09return Number.parseInt(matches.groups.chromeVersion, 10);%0A%7D%0A%0Aconst colorSupport = getChromeVersion() %3E= 69
+/.test(navigator.userAgent);%0A%0Aconst colorSupport = isBlinkBasedBrowser
  ? %7B

Simplify the browser check (#120)