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

centarius

Package Overview
Dependencies
Maintainers
3
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

centarius - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

10

dist/client/getSsrData.js

@@ -1,5 +0,11 @@

var getSsrData = function getSsrData() {
return typeof window !== 'undefined' && !!document ? window.__CENTARIUS_SERVER_STATE__ : {};
import { dataId } from '../core/constants';
var getSsrData = function getSsrData(defaultDataId) {
if (defaultDataId === void 0) {
defaultDataId = dataId;
}
return typeof window !== 'undefined' && !!document ? eval("(" + document.getElementById(defaultDataId).textContent + ")") : {};
};
export default getSsrData;

15

dist/document/CentariusData.js

@@ -6,11 +6,14 @@ import _extends from "@babel/runtime/helpers/extends";

import serialize from 'serialize-javascript';
import { dataId } from '../core/constants';
var CentariusData = function CentariusData(_ref) {
var data = _ref.data,
rest = _objectWithoutPropertiesLoose(_ref, ["data"]);
var id = _ref.id,
data = _ref.data,
rest = _objectWithoutPropertiesLoose(_ref, ["id", "data"]);
return React.createElement("script", _extends({
id: id,
type: "application/json",
dangerouslySetInnerHTML: {
__html: "window.__CENTARIUS_SERVER_STATE__=" + serialize(data)
__html: serialize(data)
}

@@ -21,7 +24,9 @@ }, rest));

CentariusData.propTypes = process.env.NODE_ENV !== "production" ? {
data: PropTypes.any
data: PropTypes.any,
id: PropTypes.string
} : {};
CentariusData.defaultProps = {
data: {}
data: {},
id: dataId
};
export default CentariusData;
{
"name": "centarius",
"version": "1.1.1",
"version": "1.1.2",
"description": "♥ Sweet React SSR for Everyone ♥",

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

},
"gitHead": "bb1e9ac1450674e89ac6da8008e864cece73d2fa"
"gitHead": "f749ee9ace354afcac84057e967c27cd4a378a67"
}
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