Socket
Socket
Sign inDemoInstall

@styled-system/css

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@styled-system/css - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

17

dist.js

@@ -18,6 +18,6 @@ "use strict";

var _lodash5 = _interopRequireDefault(require("lodash.pickby"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }

@@ -27,2 +27,4 @@

function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }

@@ -41,3 +43,3 @@

return [].concat(_toConsumableArray(a), _toConsumableArray(props));
}, [])), ['theme', 'mx', 'my', 'px', 'py']);
}, [])), ['mx', 'my', 'px', 'py']);
};

@@ -50,3 +52,5 @@

var styles = function styles(props) {
return (0, _lodash.default)(props, systemProps);
return (0, _lodash5.default)((0, _lodash.default)(props, ['theme'].concat(_toConsumableArray(systemProps))), function (val) {
return _typeof(val) !== 'object';
});
};

@@ -61,4 +65,3 @@

var styleProps = (0, _lodash2.default)(props, systemProps);
var styles = _toConsumableArray(system(_objectSpread({
var styles = (0, _lodash3.default)(system(_objectSpread({
theme: theme

@@ -69,3 +72,3 @@ }, style, styleProps)));

var value = style[key];
if (!value || _typeof(value) !== 'object') continue;
if (!value || _typeof(value) !== 'object' || Array.isArray(value)) continue;
if (systemRegExp.test(key)) continue;

@@ -72,0 +75,0 @@ styles.push(_defineProperty({}, key, css(value)({

@@ -14,2 +14,3 @@ import {

import merge from 'lodash.merge'
import pickBy from 'lodash.pickby'

@@ -19,3 +20,2 @@ const getSystemProps = funcs => [

.reduce((a, props) => [ ...a, ...props ], []),
'theme',
'mx',

@@ -34,3 +34,6 @@ 'my',

const styles = props => omit(props, systemProps)
const styles = props => pickBy(
omit(props, [ 'theme', ...systemProps ]),
val => typeof val !== 'object'
)

@@ -45,8 +48,7 @@ const system = compose(

const styleProps = pick(props, systemProps)
const styles = [
...system({ theme, ...style, ...styleProps })
]
const styles = flatten(system({ theme, ...style, ...styleProps }))
for (const key in style) {
const value = style[key]
if (!value || typeof value !== 'object') continue
if (!value || typeof value !== 'object' || Array.isArray(value)) continue
if (systemRegExp.test(key)) continue

@@ -53,0 +55,0 @@ styles.push({

{
"name": "@styled-system/css",
"version": "1.0.2",
"version": "1.0.3",
"description": "",

@@ -15,5 +15,7 @@ "main": "dist.js",

"lodash.flatten": "^4.4.0",
"lodash.isobject": "^3.0.2",
"lodash.merge": "^4.6.1",
"lodash.omit": "^4.5.0",
"lodash.pick": "^4.4.0",
"lodash.pickby": "^4.6.0",
"styled-system": "^4.1.0-0"

@@ -20,0 +22,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