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

react-themed-too

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-themed-too - npm Package Compare versions

Comparing version 0.4.6 to 0.4.7

2

lib/compose.js

@@ -223,2 +223,4 @@ "use strict";

} catch (e) {
console.log("\x1b[33m", "Info >>> If you're getting a property 'locals' TypeError, this usually means improper file imports", "\x1b[0m");
console.log("\x1b[33m", "Please check how you're importing the css file, named imports when they're default will result in this error.", "\x1b[0m");
console.log(e);

@@ -225,0 +227,0 @@ }

25

lib/extractCss.js

@@ -13,4 +13,3 @@ "use strict";

styles,
globalCss,
inserted
globalCss
} = GlobalContext[_const.contextSecret];

@@ -22,21 +21,13 @@ let target = {

Object.keys(styles).reduce((acc, curr) => {
const match = new RegExp(`${_const.contextKey}-([a-zA-Z0-9-+/]+)`, "g");
const ids = curr.split(match);
const id = ids[1];
const currentCss = styles[curr].body && styles[curr].body.css ? styles[curr].body.css : false;
const currentMediaQuery = styles[curr].body && styles[curr].body.mediaQuery ? styles[curr].body.mediaQuery : false;
if (inserted[id]) {
return acc;
} else {
const currentCss = styles[curr].body && styles[curr].body.css ? styles[curr].body.css : false;
const currentMediaQuery = styles[curr].body && styles[curr].body.mediaQuery ? styles[curr].body.mediaQuery : false;
if (currentCss) {
acc.css += currentCss;
if (currentCss) {
acc.css += currentCss;
if (currentMediaQuery) {
acc.mediaQueries += currentMediaQuery;
}
} else if (currentMediaQuery) {
if (currentMediaQuery) {
acc.mediaQueries += currentMediaQuery;
}
} else if (currentMediaQuery) {
acc.mediaQueries += currentMediaQuery;
}

@@ -43,0 +34,0 @@

{
"name": "react-themed-too",
"version": "0.4.6",
"version": "0.4.7",
"description": "CSS in React",

@@ -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