Socket
Socket
Sign inDemoInstall

fela-plugin-unit

Package Overview
Dependencies
Maintainers
1
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.14 to 5.0.15

5

es/index.js
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; };
import isUnitlessProperty from 'css-in-js-utils/lib/isUnitlessProperty';
import isPlainObject from 'lodash/isPlainObject';
function isPlainObject(obj) {
return (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && !Array.isArray(obj);
}
function addUnitIfNeeded(property, value, propertyUnit) {

@@ -7,0 +10,0 @@ var valueType = typeof value === 'undefined' ? 'undefined' : _typeof(value);

10

lib/index.js

@@ -15,8 +15,8 @@ 'use strict';

var _isPlainObject = require('lodash/isPlainObject');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var _isPlainObject2 = _interopRequireDefault(_isPlainObject);
function isPlainObject(obj) {
return (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && !Array.isArray(obj);
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function addUnitIfNeeded(property, value, propertyUnit) {

@@ -38,3 +38,3 @@ var valueType = typeof value === 'undefined' ? 'undefined' : _typeof(value);

if ((0, _isPlainObject2.default)(cssValue)) {
if (isPlainObject(cssValue)) {
style[property] = addUnit(cssValue, defaultUnit, propertyMap);

@@ -41,0 +41,0 @@ } else if (Array.isArray(cssValue)) {

{
"name": "fela-plugin-unit",
"version": "5.0.14",
"version": "5.0.15",
"description": "Fela plugin to automatically add units if required",

@@ -23,5 +23,4 @@ "main": "lib/index.js",

"dependencies": {
"css-in-js-utils": "^2.0.0",
"lodash": "^4.17.4"
"css-in-js-utils": "^2.0.0"
}
}
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