Socket
Socket
Sign inDemoInstall

postcss-merge-longhand

Package Overview
Dependencies
15
Maintainers
7
Versions
63
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.1.3 to 5.1.4

2

package.json
{
"name": "postcss-merge-longhand",
"version": "5.1.3",
"version": "5.1.4",
"description": "Merge longhand properties into shorthand with PostCSS.",

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

@@ -12,13 +12,19 @@ 'use strict';

function isConflictingProp(propA, propB) {
if (!propB.prop || propB.important !== propA.important) {
if (!propB.prop || propB.important !== propA.important ||
propA.prop === propB.prop) {
return false;
}
const parts = propA.prop.split('-');
const partsA = propA.prop.split('-');
const partsB = propB.prop.split('-');
return parts.some(() => {
parts.pop();
/* Be safe: check that the first part matches. So we don't try to
* combine e.g. border-color and color.
*/
if (partsA[0] !== partsB[0]) {
return false;
}
return parts.join('-') === propB.prop;
});
const partsASet = new Set(partsA);
return partsB.every((partB) => partsASet.has(partB));
}

@@ -25,0 +31,0 @@

@@ -42,2 +42,4 @@ declare const _exports: {

includes(searchElement: typeof borders, fromIndex?: number | undefined): boolean;
flatMap<U_3, This = undefined>(callback: (this: This, value: typeof borders, index: number, array: (typeof borders)[]) => U_3 | readonly U_3[], thisArg?: This | undefined): U_3[];
flat<A, D extends number = 1>(this: A, depth?: D | undefined): FlatArray<A, D>[];
[Symbol.iterator](): IterableIterator<typeof borders>;

@@ -53,3 +55,4 @@ [Symbol.unscopables](): {

};
at(index: number): typeof borders | undefined;
};
export = _exports;

@@ -42,2 +42,4 @@ declare const _exports: {

includes(searchElement: string, fromIndex?: number | undefined): boolean;
flatMap<U_3, This = undefined>(callback: (this: This, value: string, index: number, array: string[]) => U_3 | readonly U_3[], thisArg?: This | undefined): U_3[];
flat<A, D extends number = 1>(this: A, depth?: D | undefined): FlatArray<A, D>[];
[Symbol.iterator](): IterableIterator<string>;

@@ -53,3 +55,4 @@ [Symbol.unscopables](): {

};
at(index: number): string | undefined;
};
export = _exports;
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