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

reduce-css-calc

Package Overview
Dependencies
Maintainers
2
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reduce-css-calc - npm Package Compare versions

Comparing version

to
2.0.5

4

CHANGELOG.md

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

# 2.0.5 - 2017-05-12
- Fixed: Support division with a CSS variable.
# 2.0.4 - 2017-05-09

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

6

dist/lib/reducer.js

@@ -72,5 +72,7 @@ 'use strict';

if (left.type === 'CssVariable' || right.type === 'CssVariable') return node;
// something + 0 => something
// something - 0 => something
if (right.value === 0) return left;

@@ -171,3 +173,3 @@

function reduceDivisionExpression(node) {
if (node.right.type === 'MathExpression') return node;
if (!isValueType(node.right.type)) return node;

@@ -174,0 +176,0 @@ if (node.right.type !== 'Value') throw new Error(`Cannot divide by "${node.right.unit}", number expected`);

{
"name": "reduce-css-calc",
"version": "2.0.4",
"version": "2.0.5",
"description": "Reduce CSS calc() function to the maximum",

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