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

postcss-minify-selectors

Package Overview
Dependencies
Maintainers
5
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-minify-selectors - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

13

dist/index.js

@@ -87,3 +87,4 @@ 'use strict';

function pseudo(selector) {
if (selector.nodes.length === 1 && pseudoReplacements[selector.value]) {
const value = selector.value.toLowerCase();
if (selector.nodes.length === 1 && pseudoReplacements[value]) {
const first = selector.at(0);

@@ -94,6 +95,6 @@ const one = first.at(0);

selector.replaceWith(_postcssSelectorParser2.default.pseudo({
value: pseudoReplacements[selector.value]
value: pseudoReplacements[value]
}));
}
if (one.value === 'even') {
if (one.value.toLowerCase() === 'even') {
one.value = '2n';

@@ -105,3 +106,3 @@ }

const three = first.at(2);
if (one.value === '2n' && two.value === '+' && three.value === '1') {
if (one.value.toLowerCase() === '2n' && two.value === '+' && three.value === '1') {
one.value = 'odd';

@@ -126,3 +127,3 @@ two.remove();

});
if (~pseudoElements.indexOf(selector.value)) {
if (~pseudoElements.indexOf(value)) {
selector.value = selector.value.slice(1);

@@ -138,3 +139,3 @@ }

function tag(selector) {
const { value } = selector;
const value = selector.value.toLowerCase();
if ((0, _has2.default)(tagReplacements, value)) {

@@ -141,0 +142,0 @@ selector.value = tagReplacements[value];

{
"name": "postcss-minify-selectors",
"version": "4.0.0",
"version": "4.0.1",
"description": "Minify selectors with PostCSS.",

@@ -37,3 +37,3 @@ "main": "dist/index.js",

"has": "^1.0.0",
"postcss": "^6.0.0",
"postcss": "^7.0.0",
"postcss-selector-parser": "^3.0.0"

@@ -40,0 +40,0 @@ },

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