Socket
Socket
Sign inDemoInstall

postcss-minify-selectors

Package Overview
Dependencies
9
Maintainers
1
Versions
63
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.2.1 to 1.3.0

4

CHANGELOG.md

@@ -0,1 +1,5 @@

# 1.3.0
* Now uses the PostCSS `4.1` plugin API.
# 1.2.1

@@ -2,0 +6,0 @@

11

index.js

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

var minAttributes = require('./lib/transformAttributes');
var list = require('postcss/lib/list');
var postcss = require('postcss');
var comma = postcss.list.comma;
var normalize = require('normalize-selector');

@@ -13,3 +14,3 @@ var balanced = require('node-balanced');

function uniq (params, map) {
var transform = uniqs(list.comma(params).map(function (selector) {
var transform = uniqs(comma(params).map(function (selector) {
// Join selectors that are split over new lines

@@ -38,3 +39,3 @@ return selector.replace(/\\\n/g, '');

if (rule.parent.type !== 'root' && ~rule.parent.name.indexOf('keyframes')) {
selector = list.comma(selector).map(function (value) {
selector = comma(selector).map(function (value) {
if (value === 'from') {

@@ -68,3 +69,3 @@ return '0%';

module.exports = function () {
module.exports = postcss.plugin('postcss-minify-selectors', function () {
return function (css) {

@@ -74,2 +75,2 @@ css.eachRule(optimiseSelector);

};
};
});
{
"name": "postcss-minify-selectors",
"version": "1.2.1",
"version": "1.3.0",
"description": "Minify selectors with PostCSS.",

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

"normalize-selector": "0.0.3-a",
"postcss": "^4.0.6",
"postcss": "^4.1.2",
"uniqs": "^2.0.0"
}
}
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