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

substyle

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

substyle - npm Package Compare versions

Comparing version 5.0.0 to 5.1.0

5

lib/defaultPropsDecorator.js

@@ -11,6 +11,9 @@ 'use strict';

// many css-in-js libs process keyframes objects as the value for `animationName`
var defaultObjectPropsWhitelist = ['animationName'];
var defaultPropsDecorator = function defaultPropsDecorator(_ref) {
var style = _ref.style,
className = _ref.className;
return _extends({}, style ? { style: (0, _pickStyles.pickDirectStyles)(style) } : {}, className ? { className: className } : {});
return _extends({}, style ? { style: (0, _pickStyles.pickDirectStyles)(style, defaultObjectPropsWhitelist) } : {}, className ? { className: className } : {});
};

@@ -17,0 +20,0 @@

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

var pickDirectStyles = exports.pickDirectStyles = function pickDirectStyles(style) {
var objectPropertiesWhitelist = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
var styleKeys = (0, _lodash.keys)(style);

@@ -28,3 +30,4 @@ var result = {};

key[0] === ':' || // pseudo selectors
key[0] === '@' // @media / @keyframes / @supports / @font-face
key[0] === '@' || // @media / @keyframes / @supports / @font-face
objectPropertiesWhitelist.indexOf(key) >= 0 // whitelisted object-type properties
;

@@ -31,0 +34,0 @@ if (isDirect) {

2

package.json
{
"name": "substyle",
"version": "5.0.0",
"version": "5.1.0",
"description": "Universal styling for reusable React components",

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

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