fela-plugin-unit
Advanced tools
Comparing version 5.0.16 to 5.0.17
@@ -9,3 +9,3 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; | ||
/* eslint-disable eqeqeq */ | ||
if (valueType === 'number' || valueType === 'string' && value == parseFloat(value)) { | ||
if ((valueType === 'number' || valueType === 'string' && value == parseFloat(value)) && value != 0) { | ||
value += propertyUnit; | ||
@@ -12,0 +12,0 @@ } |
@@ -24,3 +24,3 @@ 'use strict'; | ||
/* eslint-disable eqeqeq */ | ||
if (valueType === 'number' || valueType === 'string' && value == parseFloat(value)) { | ||
if ((valueType === 'number' || valueType === 'string' && value == parseFloat(value)) && value != 0) { | ||
value += propertyUnit; | ||
@@ -27,0 +27,0 @@ } |
{ | ||
"name": "fela-plugin-unit", | ||
"version": "5.0.16", | ||
"version": "5.0.17", | ||
"description": "Fela plugin to automatically add units if required", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -6,3 +6,3 @@ # fela-plugin-unit | ||
Always writing length values as string with a value applied seems not like the JavaScript way to do it. You can also use mathematics to process number values. <br> | ||
It is aware of unitless properties such as `lineHeight` and also adds units to multiple values inside an array. | ||
It is aware of unitless properties such as `lineHeight`, zero-values and also adds units to multiple values inside an array. | ||
@@ -58,2 +58,3 @@ ## Installation | ||
{ | ||
marginTop: 0, | ||
width: 25, | ||
@@ -69,2 +70,3 @@ lineHeight: 1.4, | ||
{ | ||
marginTop: 0, | ||
width: '25em', | ||
@@ -71,0 +73,0 @@ lineHeight: 1.4, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7473
81
1