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

postcss-merge-longhand

Package Overview
Dependencies
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-merge-longhand - npm Package Compare versions

Comparing version 1.0.2 to 2.0.0

dist/lib/clone.js

4

CHANGELOG.md

@@ -0,1 +1,5 @@

# 2.0.0
* Upgraded to PostCSS 5.
# 1.0.2

@@ -2,0 +6,0 @@

18

dist/index.js

@@ -50,2 +50,6 @@ 'use strict';

var remove = function remove(node) {
return node.remove();
};
var mergeLonghand = function mergeLonghand(rule, prop) {

@@ -58,5 +62,3 @@ var properties = trblMap(prop);

if (_libCanMerge2['default'].apply(undefined, rules)) {
rules.slice(0, 3).forEach(function (rule) {
return rule.removeSelf();
});
rules.slice(0, 3).forEach(remove);
rules[3].value = (0, _libMinifyTrbl2['default'])(_libMergeValues2['default'].apply(undefined, rules));

@@ -70,3 +72,3 @@ rules[3].prop = prop;

return function (css) {
css.eachRule(function (rule) {
css.walkRules(function (rule) {
rule.nodes.filter(function (node) {

@@ -83,5 +85,3 @@ return node.prop && ~trblProps.indexOf(node.prop);

if (_libCanMerge2['default'].apply(undefined, rules) && _libNumValues2['default'].apply(undefined, rules) === 3) {
rules.slice(0, 2).forEach(function (rule) {
return rule.removeSelf();
});
rules.slice(0, 2).forEach(remove);
rules[2].prop = 'border';

@@ -95,5 +95,3 @@ rules[2].value = _libMergeValues2['default'].apply(undefined, rules);

if (_libCanMerge2['default'].apply(undefined, rules) && _libIdentical2['default'].apply(undefined, rules)) {
rules.slice(0, 3).forEach(function (rule) {
return rule.removeSelf();
});
rules.slice(0, 3).forEach(remove);
rules[3].prop = 'border';

@@ -100,0 +98,0 @@ }

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

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

"devDependencies": {
"babel": "^5.8.21",
"babel": "^5.8.23",
"babel-tape-runner": "^1.2.0",
"tap-spec": "^4.0.2",
"tap-spec": "^4.1.0",
"tape": "^4.2.0"

@@ -37,4 +37,4 @@ },

"dependencies": {
"postcss": "^4.1.16"
"postcss": "^5.0.4"
}
}
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