Socket
Socket
Sign inDemoInstall

postcss-tidy-columns

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-tidy-columns - npm Package Compare versions

Comparing version 0.4.0-beta5 to 0.4.0-beta6

lib/hasComment.js

2

CHANGELOG.md

@@ -10,3 +10,3 @@ # Change Log

- Adds a `tidy-var()` function for retrieving option values in property values (#27, #32)
- Adds `debug` option for maintaining the input declaration as a comment (#45)
- Adds `debug` option for maintaining the input declaration as a comment (#45, #48)

@@ -13,0 +13,0 @@ **Changed**

{
"name": "postcss-tidy-columns",
"version": "0.4.0-beta5",
"version": "0.4.0-beta6",
"description": "PostCSS plugin to manage column and margin alignment.",

@@ -5,0 +5,0 @@ "keywords": [

const postcss = require('postcss');
const cleanClone = require('./lib/cleanClone');
const detectCalcWrapper = require('./lib/detectCalcWrapper');
const hasComment = require('./lib/hasComment');

@@ -69,4 +70,8 @@ /**

// Save the original declaration in a comment for debugging.
if (options.debug) {
declaration.cloneBefore(postcss.comment({ text: declaration }));
if (
options.debug
&& undefined !== declaration.parent
&& !hasComment(declaration)
) {
declaration.cloneBefore(postcss.comment({ text: declaration.toString() }));
}

@@ -73,0 +78,0 @@

const postcss = require('postcss');
const cleanClone = require('./lib/cleanClone');
const hasComment = require('./lib/hasComment');

@@ -38,4 +39,8 @@ /**

// Save the original declaration in a comment for debugging.
if (options.debug) {
declaration.cloneBefore(postcss.comment({ text: declaration }));
if (
options.debug
&& undefined !== declaration.parent
&& !hasComment(declaration)
) {
declaration.cloneBefore(postcss.comment({ text: declaration.toString() }));
}

@@ -79,4 +84,8 @@

// Save the original declaration in a comment for debugging.
if (options.debug) {
declaration.cloneBefore(postcss.comment({ text: declaration }));
if (
options.debug
&& undefined !== declaration.parent
&& !hasComment(declaration)
) {
declaration.cloneBefore(postcss.comment({ text: declaration.toString() }));
}

@@ -83,0 +92,0 @@

const postcss = require('postcss');
const cleanClone = require('./lib/cleanClone');
const cleanShorthandValues = require('./lib/cleanShorthandValues');
const hasComment = require('./lib/hasComment');

@@ -54,4 +55,8 @@ /**

// Save the original declaration in a comment for debugging.
if (options.debug) {
declaration.cloneBefore(postcss.comment({ text: declaration }));
if (
options.debug
&& undefined !== declaration.parent
&& !hasComment(declaration)
) {
declaration.cloneBefore(postcss.comment({ text: declaration.toString() }));
}

@@ -116,4 +121,8 @@

// Save the original declaration in a comment for debugging.
if (options.debug) {
declaration.cloneBefore(postcss.comment({ text: declaration }));
if (
options.debug
&& undefined !== declaration.parent
&& !hasComment(declaration)
) {
declaration.cloneBefore(postcss.comment({ text: declaration.toString() }));
}

@@ -120,0 +129,0 @@

/* eslint-disable no-param-reassign */
const postcss = require('postcss');
const cleanClone = require('./lib/cleanClone');
const hasComment = require('./lib/hasComment');

@@ -53,4 +54,8 @@ /**

// Save the original declaration in a comment for debugging.
if (options.debug) {
declaration.cloneBefore(postcss.comment({ text: declaration }));
if (
options.debug
&& undefined !== declaration.parent
&& !hasComment(declaration)
) {
declaration.cloneBefore(postcss.comment({ text: declaration.toString() }));
}

@@ -57,0 +62,0 @@

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