New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

styled-components-modifiers

Package Overview
Dependencies
Maintainers
4
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

styled-components-modifiers - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

14

dist/utils/modifiedStyles.js

@@ -8,10 +8,14 @@ 'use strict';

var _lodash = require('lodash.isfunction');
var _lodash = require('lodash.isarray');
var _lodash2 = _interopRequireDefault(_lodash);
var _lodash3 = require('lodash.isobject');
var _lodash3 = require('lodash.isfunction');
var _lodash4 = _interopRequireDefault(_lodash3);
var _lodash5 = require('lodash.isobject');
var _lodash6 = _interopRequireDefault(_lodash5);
var _normalizeModifiers = require('./normalizeModifiers');

@@ -38,6 +42,6 @@

var modifierFunc = modifierConfig[modifierName];
if ((0, _lodash2.default)(modifierFunc)) {
if ((0, _lodash4.default)(modifierFunc)) {
var config = modifierFunc(componentProps);
var styles = (0, _lodash4.default)(config) ? config.styles : config;
return acc.concat(styles);
var styles = (0, _lodash6.default)(config) && config.styles ? config.styles : config;
return (0, _lodash2.default)(styles) ? acc.concat(styles.join('')) : acc.concat(styles);
}

@@ -44,0 +48,0 @@ return acc;

{
"name": "styled-components-modifiers",
"version": "1.1.0",
"version": "1.1.1",
"description": "A library that enables BEM flavored modifiers to styled components",

@@ -36,3 +36,4 @@ "main": "dist/index.js",

"peerDependencies": {
"prop-types": "^15.4.0"
"prop-types": "^15.4.0",
"styled-components": "^2 | ^3 | ^4"
},

@@ -44,2 +45,3 @@ "dependencies": {

"lodash.forin": "^4.4.0",
"lodash.isarray": "^4.0.0",
"lodash.iserror": "^3.1.1",

@@ -64,3 +66,6 @@ "lodash.isfunction": "^3.0.8",

"prop-types": "^15.6.0",
"rimraf": "^2.6.2"
"react": "^16.8.6",
"react-dom": "^16.8.6",
"rimraf": "^2.6.2",
"styled-components": "^4.2.0"
},

@@ -67,0 +72,0 @@ "jest": {

@@ -18,15 +18,17 @@ # Styled Components Modifiers

- [Overview](#overview)
- [Blocks and Elements](#blocks-and-elements)
- [Modifiers](#modifiers)
- [Installation](#installation)
- [Using Styled Components Modifiers](#using-styled-components-modifiers)
- [Defining Modifiers](#defining-modifiers)
- [Validating Modifiers](#validating-modifiers)
- [Applying Modifiers](#applying-modifiers)
- [Responsive Modifiers](#responsive-modifiers)
- [Alternative Prop Names](#alternative-prop-names)
- [Built with Styled Components Modifiers](#built-with-styled-components-modifiers)
- [Contributing](#contributing)
- [License](#license)
- [Styled Components Modifiers](#styled-components-modifiers)
- [Contents](#contents)
- [Overview](#overview)
- [Blocks and Elements](#blocks-and-elements)
- [Modifiers](#modifiers)
- [Installation](#installation)
- [Using Styled Components Modifiers](#using-styled-components-modifiers)
- [Defining Modifiers](#defining-modifiers)
- [Validating Modifiers](#validating-modifiers)
- [Applying Modifiers](#applying-modifiers)
- [Responsive Modifiers](#responsive-modifiers)
- [Alternative Prop Names](#alternative-prop-names)
- [Built with Styled Components Modifiers](#built-with-styled-components-modifiers)
- [Contributing](#contributing)
- [License](#license)

@@ -143,3 +145,5 @@ ## Overview

warning: ({ theme }) => `
// Styled Components exports a `css` util that enables some nice linting and interpolation
// features. You can use it directly or with the `styles` object pattern.
warning: ({ theme }) => css`
background-color: ${theme.colors.warning};

@@ -146,0 +150,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