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

reshape-preact-components

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reshape-preact-components - npm Package Compare versions

Comparing version 0.5.0 to 0.5.1

2

lib/browser.esm.js

@@ -1,1 +0,1 @@

function toVnode(t,n,r){var e=t[n.name]||n.name,o={};for(var a in n.attrs)o[a]=n.attrs[a].map(function(t){return t.content}).join("");if(r&&(o._ssr=r),"string"==typeof n.content)return h(e,o,n.content);if(Array.isArray(n.content)){var c=n.content.map(function(n){return"tag"===n.type?toVnode(t,n):"text"===n.type?n.content:void 0});return h(e,o,c)}return h(e,o)}function browserEncode(t){return window.btoa(JSON.stringify(t))}function browserDecode(t){return JSON.parse(window.atob(t))}function hydrateInitialState(t,n){return toVnode(n,browserDecode_1(t))}import{h}from"preact";var browserEncode_1=browserEncode,browserDecode_1=browserDecode;export{hydrateInitialState,browserEncode_1 as encode,browserDecode_1 as decode};
function toVnode(t,n,e){var r=t[n.name]||n.name,o={};for(var a in n.attrs)o[a]=n.attrs[a].map(function(t){return t.content}).join("");if(e&&(o._state=e),"string"==typeof n.content)return h(r,o,n.content);if(Array.isArray(n.content)){var c=n.content.map(function(n){return"tag"===n.type?toVnode(t,n):"text"===n.type?n.content:void 0});return h(r,o,c)}return h(r,o)}function browserEncode(t){return window.btoa(JSON.stringify(t))}function browserDecode(t){return JSON.parse(window.atob(t))}function hydrateInitialState(t,n){return toVnode(n,browserDecode_1(t))}import{h}from"preact";var browserEncode_1=browserEncode,browserDecode_1=browserDecode;export{hydrateInitialState,browserEncode_1 as encode,browserDecode_1 as decode};

@@ -1,1 +0,1 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("preact")):"function"==typeof define&&define.amd?define(["exports","preact"],e):e(t.reshapePreact=t.reshapePreact||{},t.preact)}(this,function(t,e){"use strict";function n(t,r,o){var i=t[r.name]||r.name,a={};for(var c in r.attrs)a[c]=r.attrs[c].map(function(t){return t.content}).join("");if(o&&(a._ssr=o),"string"==typeof r.content)return e.h(i,a,r.content);if(Array.isArray(r.content)){var u=r.content.map(function(e){return"tag"===e.type?n(t,e):"text"===e.type?e.content:void 0});return e.h(i,a,u)}return e.h(i,a)}function r(t){return window.btoa(JSON.stringify(t))}function o(t){return JSON.parse(window.atob(t))}function i(t,e){return n(e,c(t))}var a=r,c=o;t.hydrateInitialState=i,t.encode=a,t.decode=c,Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("preact")):"function"==typeof define&&define.amd?define(["exports","preact"],e):e(t.reshapePreact=t.reshapePreact||{},t.preact)}(this,function(t,e){"use strict";function n(t,r,o){var i=t[r.name]||r.name,a={};for(var c in r.attrs)a[c]=r.attrs[c].map(function(t){return t.content}).join("");if(o&&(a._state=o),"string"==typeof r.content)return e.h(i,a,r.content);if(Array.isArray(r.content)){var u=r.content.map(function(e){return"tag"===e.type?n(t,e):"text"===e.type?e.content:void 0});return e.h(i,a,u)}return e.h(i,a)}function r(t){return window.btoa(JSON.stringify(t))}function o(t){return JSON.parse(window.atob(t))}function i(t,e){return n(e,c(t))}var a=r,c=o;t.hydrateInitialState=i,t.encode=a,t.decode=c,Object.defineProperty(t,"__esModule",{value:!0})});

@@ -13,4 +13,4 @@ 'use strict';

}
// if there is a compressed original source, add it as _ssr prop
if (originalHtml) { props._ssr = originalHtml; }
// if there is a compressed original source, add it as _state prop
if (originalHtml) { props._state = originalHtml; }
// content is either a string, a subtree, or there isn't any

@@ -17,0 +17,0 @@ if (typeof node.content === 'string') {

{
"name": "reshape-preact-components",
"description": "server render preact components and use them like custom elements",
"version": "0.5.0",
"version": "0.5.1",
"author": "reshape",

@@ -6,0 +6,0 @@ "ava": {

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