hast-util-to-dom
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -41,4 +41,4 @@ 'use strict'; | ||
properties: { | ||
xmlns, | ||
} = {}, | ||
xmlns | ||
} = {} | ||
} = children[0]; | ||
@@ -70,7 +70,3 @@ if (xmlns) { | ||
function doctype(node) { | ||
return document.implementation.createDocumentType( | ||
node.name || 'html', | ||
node.public || '', | ||
node.system || '', | ||
); | ||
return document.implementation.createDocumentType(node.name || 'html', node.public || '', node.system || ''); | ||
} | ||
@@ -98,5 +94,3 @@ | ||
const { tagName, properties, children = [] } = node; | ||
const el = typeof namespace !== 'undefined' | ||
? document.createElementNS(namespace, tagName) | ||
: document.createElement(tagName); | ||
const el = typeof namespace !== 'undefined' ? document.createElementNS(namespace, tagName) : document.createElement(tagName); | ||
@@ -110,3 +104,3 @@ // Add HTML attributes | ||
name: key, | ||
propertyName: key, | ||
propertyName: key | ||
}; | ||
@@ -119,3 +113,3 @@ const { | ||
boolean, | ||
overloadedBoolean, | ||
overloadedBoolean | ||
// numeric, | ||
@@ -132,3 +126,3 @@ // positiveNumeric, | ||
} | ||
if (boolean || (overloadedBoolean && typeof value === 'boolean')) { | ||
if (boolean || overloadedBoolean && typeof value === 'boolean') { | ||
if (value) { | ||
@@ -135,0 +129,0 @@ el.setAttribute(name, ''); |
{ | ||
"name": "hast-util-to-dom", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Transform HAST to DOM", | ||
@@ -5,0 +5,0 @@ "main": "dist/hast-util-to-dom.js", |
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
11529
270