Socket
Socket
Sign inDemoInstall

postcss-merge-longhand

Package Overview
Dependencies
17
Maintainers
4
Versions
63
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.0.9 to 4.0.10

9

dist/lib/decl/borders.js

@@ -376,3 +376,10 @@ 'use strict';

const values = rules.map(node => (0, _parseWsc2.default)(node.value).map((value, i) => value || defaults[i]).join(' '));
const values = rules.map(node => {
const wscValue = (0, _parseWsc2.default)(node.value);
if (!(0, _validateWsc.isValidWsc)(wscValue)) {
return node.value;
}
return wscValue.map((value, i) => value || defaults[i]).join(' ');
});
const reduced = getDistinctShorthands(values);

@@ -379,0 +386,0 @@

13

dist/lib/parseWsc.js

@@ -14,2 +14,9 @@ 'use strict';

const varRE = /(^.*var)(.*\(.*--.*\))(.*)/i;
const varPreserveCase = p => `${p[1].toLowerCase()}${p[2]}${p[3].toLowerCase()}`;
const toLower = v => {
const match = varRE.exec(v);
return match ? varPreserveCase(match) : v.toLowerCase();
};
function parseWsc(value) {

@@ -32,7 +39,7 @@ if (none.test(value)) {

if ((0, _validateWsc.isStyle)(v)) {
style = v.toLowerCase();
style = toLower(v);
} else if ((0, _validateWsc.isWidth)(v)) {
width = v.toLowerCase();
width = toLower(v);
} else if ((0, _validateWsc.isColor)(v)) {
color = v.toLowerCase();
color = toLower(v);
} else {

@@ -39,0 +46,0 @@ unknown.push(v);

{
"name": "postcss-merge-longhand",
"version": "4.0.9",
"version": "4.0.10",
"description": "Merge longhand properties into shorthand with PostCSS.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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