min-documentx
Advanced tools
Comparing version 2.17.1 to 2.17.2
{ | ||
"name": "min-documentx", | ||
"version": "2.17.1", | ||
"version": "2.17.2", | ||
"description": "A minimal DOM implementation", | ||
@@ -5,0 +5,0 @@ "keywords": [], |
module.exports = serializeNode | ||
var voidElements = /area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr/i; | ||
var hasOwn = Object.prototype.hasOwnProperty; | ||
@@ -54,3 +55,3 @@ function serializeNode(node) { | ||
return elem.hasOwnProperty(key) && | ||
(type === "string" || type === "boolean" || type === "number") && | ||
(type === "string" || (type === "boolean" && elem[key]) || type === "number") && | ||
key !== "nodeName" && key !== "className" && key !== "tagName" && | ||
@@ -93,3 +94,3 @@ key !== "textContent" && key !== "innerText" && key !== "namespaceURI" && key !== "innerHTML" | ||
attributes.push(name + "=" + "\"" + escapeAttributeValue(value) + "\"") | ||
attributes.push(name + "=" + "\"" + escapeAttributeValue(String(value)) + "\"") | ||
}) | ||
@@ -103,3 +104,3 @@ | ||
for (var key in elem) { | ||
if (isProperty(elem, key)) { | ||
if (hasOwn.call(elem, key) && isProperty(elem, key)) { | ||
props.push({ name: key, value: elem[key] }) | ||
@@ -106,0 +107,0 @@ } |
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
53074
1125