🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

postcss-normalize-whitespace

Package Overview
Dependencies
Maintainers
7
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-normalize-whitespace - npm Package Compare versions

Comparing version

to
5.0.3

7

dist/index.js

@@ -15,2 +15,3 @@ "use strict";

const rule = 'rule';
const variableFunctions = new Set(['var', 'env', 'constant']);

@@ -21,3 +22,3 @@ function reduceCalcWhitespaces(node) {

} else if (node.type === 'function') {
if (!['var', 'env', 'constant'].includes(node.value.toLowerCase())) {
if (!variableFunctions.has(node.value.toLowerCase())) {
node.before = node.after = '';

@@ -34,3 +35,3 @@ }

} else if (node.type === 'function') {
if (!['var', 'env', 'constant'].includes(node.value.toLowerCase())) {
if (!variableFunctions.has(node.value.toLowerCase())) {
node.before = node.after = '';

@@ -58,3 +59,3 @@ }

if (~[decl, rule, atrule].indexOf(type) && node.raws.before) {
if ([decl, rule, atrule].includes(type) && node.raws.before) {
node.raws.before = node.raws.before.replace(/\s/g, '');

@@ -61,0 +62,0 @@ }

{
"name": "postcss-normalize-whitespace",
"version": "5.0.2",
"version": "5.0.3",
"description": "Trim whitespace inside and around CSS rules & declarations.",

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