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

preact-render-to-json

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

preact-render-to-json - npm Package Compare versions

Comparing version 3.6.3 to 3.6.4

17

dist/index.js

@@ -7,17 +7,2 @@ (function (global, factory) {

var ESC = {
'<': '&lt;',
'>': '&gt;',
'"': '&quot;',
'&': '&amp;'
};
var encodeEntities = function (s) {
return String(s).replace(/[<>"&]/g, escapeChar);
};
var escapeChar = function (a) {
return ESC[a] || a;
};
var falsey = function (v) {

@@ -68,3 +53,3 @@ return v == null || v === false;

if (!nodeName) {
return encodeEntities(vnode);
return vnode;
}

@@ -71,0 +56,0 @@

2

package.json
{
"name": "preact-render-to-json",
"amdName": "preactRenderToJSON",
"version": "3.6.3",
"version": "3.6.4",
"description": "Render JSX and Preact components to JSON",

@@ -6,0 +6,0 @@ "main": "dist/index.js",

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

import { encodeEntities, falsey, assign, getNodeProps } from './util';
import { falsey, assign, getNodeProps } from './util';

@@ -45,3 +45,3 @@ const SHALLOW = { shallow: true };

if (!nodeName) {
return encodeEntities(vnode);
return vnode;
}

@@ -48,0 +48,0 @@

const ESC = {
'<': '&lt;',
'>': '&gt;',
'"': '&quot;',
'&': '&amp;'
};
export let encodeEntities = s => String(s).replace(/[<>"&]/g, escapeChar);
let escapeChar = a => ESC[a] || a;
export let falsey = v => v==null || v===false;

@@ -14,0 +3,0 @@

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