Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rework-matches

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rework-matches - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

10

index.js

@@ -25,2 +25,6 @@ var COMMA_PLACEHOLDER = '&';

function isNotMatchesSelector(selector) {
return selector.indexOf(':matches(') === -1;
}
return function(style) {

@@ -38,5 +42,6 @@ style.rules.forEach(function replaceMatches(rule) {

// :matches(...) selector gets munged.
var actualSelectors = rule.selectors.join(',').replace(/:matches\(.*\)/g, function(substr) {
var actualSelectors = rule.selectors.join(',').replace(/:matches\(.*?\)/g, function(substr) {
return substr.replace(/,/g, COMMA_PLACEHOLDER);
}).split(',');
rule.selectors = actualSelectors;

@@ -68,8 +73,9 @@ rule.selectors.forEach(function findMatchesSelector(selector, i) {

rule.selectors.splice(i, 1);
addCartesianSelectors(selector, matches, values, rule.selectors);
}
});
rule.selectors = rule.selectors.filter(isNotMatchesSelector);
});
};
};

2

package.json
{
"name": "rework-matches",
"version": "0.0.4",
"version": "0.0.5",
"description": "A rework plugin for the :matches CSS pseudo-selector.",

@@ -5,0 +5,0 @@ "main": "index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc