Socket
Socket
Sign inDemoInstall

csso

Package Overview
Dependencies
Maintainers
1
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

csso - npm Package Compare versions

Comparing version 1.2.15 to 1.2.16

test/data/test_stylesheet/issue79.test1.cl

9

lib/compressor.js

@@ -166,2 +166,3 @@ function TRBL(name, imp) {

};
function CSSOCompressor() {}

@@ -1159,2 +1160,3 @@

if (ps.length && pb.length) {
if (token[1] !== p[1]) return;
// try to join by selectors

@@ -1225,4 +1227,6 @@ ph = this.getHash(ps);

if (ps.length && pb.length) {
if (token[1] !== p[1]) return;
// try to join by properties
r = this.analyze(token, p);
if (r.eq.length && (r.ne1.length || r.ne2.length)) {

@@ -1298,5 +1302,8 @@ if (r.ne1.length && !r.ne2.length) { // p in token

CSSOCompressor.prototype.analyze = function(r1, r2) {
var r = { eq: [], ne1: [], ne2: [] };
if (r1[1] !== r2[1]) return r;
var b1 = r1[3], b2 = r2[3],
d1 = b1.slice(2), d2 = b2.slice(2),
r = { eq: [], ne1: [], ne2: [] },
h1, h2, i, x;

@@ -1303,0 +1310,0 @@

2

lib/util.js

@@ -34,3 +34,3 @@ var $util = {};

$util.printTree = function(tree) {
require('util').print($util.treeToString(tree));
require('sys').print($util.treeToString(tree));
};

@@ -37,0 +37,0 @@

{
"name": "csso",
"description": "CSSO — CSS optimizer",
"version": "1.2.15",
"version": "1.2.16",
"homepage": "http://github.com/css/csso",

@@ -6,0 +6,0 @@ "author": "Sergey Kryzhanovsky <skryzhanovsky@ya.ru> (http://github.com/afelix)",

@@ -0,1 +1,2 @@

function CSSOCompressor() {}

@@ -993,2 +994,3 @@

if (ps.length && pb.length) {
if (token[1] !== p[1]) return;
// try to join by selectors

@@ -1059,4 +1061,6 @@ ph = this.getHash(ps);

if (ps.length && pb.length) {
if (token[1] !== p[1]) return;
// try to join by properties
r = this.analyze(token, p);
if (r.eq.length && (r.ne1.length || r.ne2.length)) {

@@ -1132,5 +1136,8 @@ if (r.ne1.length && !r.ne2.length) { // p in token

CSSOCompressor.prototype.analyze = function(r1, r2) {
var r = { eq: [], ne1: [], ne2: [] };
if (r1[1] !== r2[1]) return r;
var b1 = r1[3], b2 = r2[3],
d1 = b1.slice(2), d2 = b2.slice(2),
r = { eq: [], ne1: [], ne2: [] },
h1, h2, i, x;

@@ -1137,0 +1144,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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