Socket
Socket
Sign inDemoInstall

analyze-css

Package Overview
Dependencies
76
Maintainers
1
Versions
186
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.1.132 to 2.2.0

4

package.json
{
"name": "analyze-css",
"version": "2.1.132",
"version": "2.2.0",
"author": "Maciej Brencz <maciej.brencz@gmail.com> (https://github.com/macbre)",

@@ -25,3 +25,3 @@ "description": "CSS selectors complexity and performance analyzer",

"cli": "^1.0.1",
"commander": "^11.0.0",
"commander": "^12.0.0",
"css": "^3.0.0",

@@ -28,0 +28,0 @@ "css-shorthand-properties": "^1.1.1",

@@ -13,3 +13,13 @@ "use strict";

analyzer.on("selector", function (rule, selector, expressions) {
if (expressions.length > COMPLEX_SELECTOR_THRESHOLD) {
let filteredExpr = expressions.filter((item) => {
return ![
"adjacent",
"parent",
"child",
"descendant",
"sibling",
"column-combinator",
].includes(item.type);
});
if (filteredExpr.length > COMPLEX_SELECTOR_THRESHOLD) {
analyzer.incrMetric("complexSelectors");

@@ -16,0 +26,0 @@ analyzer.addOffender("complexSelectors", selector);

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