preact-render-to-json
Advanced tools
Comparing version 3.6.3 to 3.6.4
@@ -7,17 +7,2 @@ (function (global, factory) { | ||
var ESC = { | ||
'<': '<', | ||
'>': '>', | ||
'"': '"', | ||
'&': '&' | ||
}; | ||
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 @@ |
{ | ||
"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 = { | ||
'<': '<', | ||
'>': '>', | ||
'"': '"', | ||
'&': '&' | ||
}; | ||
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21827
287