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.0 to 1.1.1

10

dist/client/getSsrData.js

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

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

16

dist/document/CentariusData.js
import _extends from "@babel/runtime/helpers/extends";
import _objectSpread from "@babel/runtime/helpers/objectSpread";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";

@@ -7,14 +6,11 @@ import React from 'react';

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

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

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

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

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