Socket
Socket
Sign inDemoInstall

stylecow-plugin-matches

Package Overview
Dependencies
0
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0 to 3.0.0

22

index.js
module.exports = function (stylecow) {
stylecow.addTask({
"Function": {
":matches": function (fn) {
var selector = fn.parent({type: 'Selector'});
var value = selector.toString();
var search = fn.toString();
filter: {
type: 'Function',
name: ':matches'
},
fn: function (fn) {
var selector = fn.parent('Selector');
var value = selector.toString();
var search = fn.toString();
fn.getContent().forEach(function (replace) {
selector.before(new stylecow.Selector()).setContent(value.replace(search, replace));
});
fn.forEach(function (replace) {
selector.before(stylecow.Selector.createFromString(value.replace(search, replace.toString())));
});
selector.remove();
}
selector.remove();
}
});
};
{
"name": "stylecow-plugin-matches",
"description": "Stylecow plugin to add support for :matches() selector function to all browsers",
"version": "2.0.0",
"version": "3.0.0",
"author": "Oscar Otero <oom@oscarotero.com>",

@@ -6,0 +6,0 @@ "homepage": "https://github.com/stylecow/stylecow-plugin-matches",

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