Socket
Socket
Sign inDemoInstall

react-base16-styling

Package Overview
Dependencies
8
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.4.5 to 0.4.6

34

lib/index.js

@@ -8,2 +8,6 @@ 'use strict';

var _extends2 = require('babel-runtime/helpers/extends');
var _extends3 = _interopRequireDefault(_extends2);
var _typeof2 = require('babel-runtime/helpers/typeof');

@@ -13,6 +17,2 @@

var _extends2 = require('babel-runtime/helpers/extends');
var _extends3 = _interopRequireDefault(_extends2);
var _toConsumableArray2 = require('babel-runtime/helpers/toConsumableArray');

@@ -103,15 +103,25 @@

return styles.reduce(function (obj, s) {
var props = styles.reduce(function (obj, s) {
if (typeof s === 'string') {
return (0, _extends3.default)({}, obj, { className: [obj.className, s].filter(function (c) {
return c;
}).join(' ') });
obj.className = [obj.className, s].filter(function (c) {
return c;
}).join(' ');
} else if ((typeof s === 'undefined' ? 'undefined' : (0, _typeof3.default)(s)) === 'object') {
return (0, _extends3.default)({}, obj, { style: (0, _extends3.default)({}, obj.style, s) });
obj.style = (0, _extends3.default)({}, obj.style, s);
} else if (typeof s === 'function') {
return (0, _extends3.default)({}, obj, s.apply(undefined, [obj].concat(args)));
} else {
return obj;
obj = (0, _extends3.default)({}, obj, s.apply(undefined, [obj].concat(args)));
}
return obj;
}, { className: '', style: {} });
if (!props.className) {
delete props.className;
}
if ((0, _keys2.default)(props.style).length === 0) {
delete props.style;
}
return props;
};

@@ -118,0 +128,0 @@

{
"name": "react-base16-styling",
"version": "0.4.5",
"version": "0.4.6",
"description": "React styling with base16 color scheme support",

@@ -12,3 +12,3 @@ "main": "lib/index.js",

"version": "npm run build && git add -A .",
"postversion": "git push",
"postversion": "git push --tags",
"prepublish": "npm run build"

@@ -15,0 +15,0 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc