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

@emotion/cache

Package Overview
Dependencies
Maintainers
2
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@emotion/cache - npm Package Compare versions

Comparing version 0.4.1 to 0.5.0

24

dist/index.cjs.js

@@ -73,2 +73,24 @@ 'use strict';

var createCache = function createCache() {
var inserted = {};
function _ref(id) {
inserted[id] = true;
}
function _ref2(node) {
var attrib = node.getAttribute('data-emotion-ssr'); // $FlowFixMe
attrib.split(' ').forEach(_ref);
if (node.parentNode !== document.head) {
// $FlowFixMe
document.head.appendChild(node);
}
}
if (utils.isBrowser) {
var nodes = document.querySelectorAll('style[data-emotion-ssr]');
Array.prototype.forEach.call(nodes, _ref2);
}
var context = {

@@ -79,3 +101,3 @@ stylis: stylis,

}),
inserted: {},
inserted: inserted,
registered: {},

@@ -82,0 +104,0 @@ theme: {}

@@ -71,2 +71,24 @@ import { Stylis } from 'emotion-utils';

var createCache = function createCache() {
var inserted = {};
function _ref(id) {
inserted[id] = true;
}
function _ref2(node) {
var attrib = node.getAttribute('data-emotion-ssr'); // $FlowFixMe
attrib.split(' ').forEach(_ref);
if (node.parentNode !== document.head) {
// $FlowFixMe
document.head.appendChild(node);
}
}
if (isBrowser) {
var nodes = document.querySelectorAll('style[data-emotion-ssr]');
Array.prototype.forEach.call(nodes, _ref2);
}
var context = {

@@ -77,3 +99,3 @@ stylis: stylis,

}),
inserted: {},
inserted: inserted,
registered: {},

@@ -80,0 +102,0 @@ theme: {}

8

package.json
{
"name": "@emotion/cache",
"version": "0.4.1",
"version": "0.5.0",
"description": "emotion's cache",

@@ -11,5 +11,5 @@ "main": "dist/index.cjs.js",

"@emotion/sheet": "^0.2.0",
"@emotion/types": "^0.2.3",
"@emotion/utils": "^0.4.1",
"emotion-utils": "^9.0.1"
"@emotion/types": "^0.5.0",
"@emotion/utils": "^0.5.0",
"emotion-utils": "^9.1.0"
},

@@ -16,0 +16,0 @@ "publishConfig": {

@@ -8,6 +8,23 @@ // @flow

const createCache = () => {
let inserted = {}
if (isBrowser) {
const nodes = document.querySelectorAll('style[data-emotion-ssr]')
Array.prototype.forEach.call(nodes, (node: HTMLStyleElement) => {
const attrib = node.getAttribute('data-emotion-ssr')
// $FlowFixMe
attrib.split(' ').forEach(id => {
inserted[id] = true
})
if (node.parentNode !== document.head) {
// $FlowFixMe
document.head.appendChild(node)
}
})
}
const context: CSSContextType = {
stylis,
sheet: new StyleSheet({ key: '' }),
inserted: {},
inserted,
registered: {},

@@ -14,0 +31,0 @@ theme: {}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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