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

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 1.0.2 to 1.1.0

45

lib/prototypes.js

@@ -156,2 +156,47 @@ (function (stylecow) {

getSiblings: function (match) {
var parent = this.parent;
var result = new Collection();
if (!parent) {
return result;
}
for (var i = 0, t = parent.length; i < t; ++i) {
if (parent[i] !== this && parent[i].is(match)) {
result.push(this[i]);
}
};
return result;
},
hasSibling: function (match) {
var parent = this.parent;
if (!parent) {
return false;
}
for (var i = 0, t = parent.length; i < t; ++i) {
if (parent[i] !== this && parent[i].is(match)) {
return true;
}
}
return false;
},
getSibling: function (match) {
var parent = this.parent;
if (parent) {
for (var i = 0, t = parent.length; i < t; ++i) {
if (parent[i] !== this && parent[i].is(match)) {
return parent[i];
}
}
}
},
setSource: function (token) {

@@ -158,0 +203,0 @@ this.data.line = token.currToken[1];

28

lib/tasks.js

@@ -63,6 +63,10 @@ (function (stylecow) {

//browser compatibility
if (!needFix(support, task.forBrowsersLowerThan)) {
if (!needFix(support, task, 'forBrowsersLowerThan')) {
continue;
}
if (!needFix(support, task, 'forBrowsersUpperOrEqualTo')) {
continue;
}
//Sort by position (after|before)

@@ -101,15 +105,27 @@ tasks[task.position] = tasks[task.position] || {};

//check the browser support of a task
function needFix (minSupport, disablePlugin) {
if (!disablePlugin || !minSupport) {
function needFix (stylecowSupport, task, method) {
var taskSupport = task[method];
if (!taskSupport || !stylecowSupport) {
return true;
}
for (var browser in disablePlugin) {
if (minSupport[browser] === false) {
for (var browser in taskSupport) {
if (stylecowSupport[browser] === false) {
continue;
}
if (disablePlugin[browser] === false || minSupport[browser] < disablePlugin[browser]) {
if (method === 'forBrowsersLowerThan' && (taskSupport[browser] === false || stylecowSupport[browser] < taskSupport[browser])) {
return true;
}
if (method === 'forBrowsersUpperOrEqualTo') {
if (taskSupport[browser] === false) {
return false;
}
if (stylecowSupport[browser] >= taskSupport[browser]) {
return true;
}
}
}

@@ -116,0 +132,0 @@

{
"name": "stylecow-core",
"description": "Stylecow core library",
"version": "1.0.2",
"version": "1.1.0",
"author": "Oscar Otero <oom@oscarotero.com>",

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

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