Socket
Socket
Sign inDemoInstall

fela-plugin-extend

Package Overview
Dependencies
Maintainers
1
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fela-plugin-extend - npm Package Compare versions

Comparing version 6.0.3 to 6.0.4

10

es/index.js

@@ -1,9 +0,7 @@

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 objectEach from 'fast-loops/lib/objectEach';
import arrayEach from 'fast-loops/lib/arrayEach';
import isPlainObject from 'isobject';
import removeUndefinedPlugin from 'fela-plugin-remove-undefined';
function isPlainObject(obj) {
return (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && !Array.isArray(obj);
}
var removeUndefined = removeUndefinedPlugin();

@@ -18,3 +16,3 @@ function extendStyle(style, extension, extendPlugin, type, renderer) {

// extend basic style objects
renderer._mergeStyle(style, extension);
renderer._mergeStyle(style, removeUndefined(extension));
}

@@ -21,0 +19,0 @@ }

18

lib/index.js

@@ -7,4 +7,2 @@ 'use strict';

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; };
var _objectEach = require('fast-loops/lib/objectEach');

@@ -18,7 +16,13 @@

var _isobject = require('isobject');
var _isobject2 = _interopRequireDefault(_isobject);
var _felaPluginRemoveUndefined = require('fela-plugin-remove-undefined');
var _felaPluginRemoveUndefined2 = _interopRequireDefault(_felaPluginRemoveUndefined);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function isPlainObject(obj) {
return (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && !Array.isArray(obj);
}
var removeUndefined = (0, _felaPluginRemoveUndefined2.default)();

@@ -33,3 +37,3 @@ function extendStyle(style, extension, extendPlugin, type, renderer) {

// extend basic style objects
renderer._mergeStyle(style, extension);
renderer._mergeStyle(style, removeUndefined(extension));
}

@@ -47,3 +51,3 @@ }

delete style[property];
} else if (isPlainObject(value)) {
} else if ((0, _isobject2.default)(value)) {
// support nested extend as well

@@ -50,0 +54,0 @@ style[property] = extend(value, type, renderer);

{
"name": "fela-plugin-extend",
"version": "6.0.3",
"version": "6.0.4",
"description": "Fela plugin to extend style objects",

@@ -27,4 +27,6 @@ "main": "lib/index.js",

"css-in-js-utils": "2.0.0",
"fast-loops": "^1.0.0"
"fast-loops": "^1.0.0",
"fela-plugin-remove-undefined": "^5.0.19",
"isobject": "^3.0.1"
}
}

@@ -5,3 +5,4 @@ # fela-plugin-extend

Allows styles to be extended with other style objects. Supports a condition-based API.
Allows styles to be extended with other style objects. Supports a condition-based API.<br>
It automatically removes `null` and `undefined` values **before** merging styles.

@@ -8,0 +9,0 @@ ## Installation

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