Socket
Socket
Sign inDemoInstall

stylecow-core

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stylecow-core - npm Package Compare versions

Comparing version 2.3.1 to 2.4.0

tests/cases/at-namespace/output.normal.css

10

lib/css/classes/node-collection.js

@@ -33,2 +33,12 @@ "use strict";

isEmpty () {
for (let i = 0, t = this.length; i < t; i++) {
if (!this[i].isEmpty()) {
return false;
}
}
return true;
}
push (child) {

@@ -35,0 +45,0 @@ if (child.hasParent()) {

4

lib/css/classes/node.js

@@ -68,2 +68,6 @@ "use strict";

isEmpty () {
return false;
}
getParent (match) {

@@ -70,0 +74,0 @@ if (this[_parent] && (!match || this[_parent].is(match))) {

@@ -62,2 +62,6 @@ "use strict";

isEmpty () {
return this.getChild('Block').isEmpty();
}
toString () {

@@ -72,2 +76,6 @@ if (this.name === 'document') {

toCode (code) {
if (this.isEmpty()) {
return;
}
code.appendStyle('at-rule-block-before');

@@ -74,0 +82,0 @@ code.append('@' + this.getNameWithVendor() + ' ', this);

@@ -20,2 +20,6 @@ "use strict";

isEmpty () {
return this.getChild('Block').isEmpty();
}
toString () {

@@ -26,2 +30,6 @@ return this.join(' ');

toCode (code) {
if (this.isEmpty()) {
return;
}
code.appendStyle('rule-before');

@@ -28,0 +36,0 @@ this.forEach(child => child.toCode(code));

6

package.json

@@ -10,3 +10,3 @@ {

],
"version": "2.3.1",
"version": "2.4.0",
"engines": {

@@ -29,7 +29,7 @@ "node": ">=4.0"

"multi-stage-sourcemap": "^0.2.1",
"source-map": "^0.1.*"
"source-map": "^0.5.*"
},
"devDependencies": {
"mocha": "^2.5.3"
"mocha": "^3.0.2"
}
}

@@ -5,6 +5,6 @@ var assert = require('assert');

var cases = new stylecow.Test(__dirname + '/cases');
var coder = new stylecow.Coder();
cases.cssErrors(true).run(function (test) {
describe('cases/' + test.name, function() {
it('should match output.css', function() {

@@ -15,2 +15,9 @@ //test.writeString()

var code = coder.run(test.css);
it('should match output.normal.css', function() {
//test.write('output.normal.css', code.css);
assert.equal(test.normalize(code.css), test.read('output.normal.css'));
});
it('clone should match output.css', function() {

@@ -17,0 +24,0 @@ //test.write('output.css', test.css.toString());

@@ -17,7 +17,2 @@ var assert = require('assert');

it('should match ast.json', function() {
//test.writeAst()
test.assertAst();
});
var normalCode = normal.run(test.css);

@@ -24,0 +19,0 @@ var minifyCode = minifier.run(test.css, 'output.min.css');

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