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

fela-plugin-unit

Package Overview
Dependencies
Maintainers
2
Versions
111
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fela-plugin-unit - npm Package Compare versions

Comparing version 5.0.16 to 5.0.17

2

es/index.js

@@ -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,

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