Socket
Socket
Sign inDemoInstall

supports-color

Package Overview
Dependencies
1
Maintainers
2
Versions
50
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 9.0.0 to 9.0.1

12

browser.js
/* 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,

2

package.json
{
"name": "supports-color",
"version": "9.0.0",
"version": "9.0.1",
"description": "Detect whether a terminal supports color",

@@ -5,0 +5,0 @@ "license": "MIT",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc