Comparing version 5.2.14 to 5.2.15
@@ -17,3 +17,3 @@ /** | ||
export type IElement = { | ||
[key in keyof HTMLElementTagNameMap]?: string | number | [IAttrs, (IElement | string | number)[] | string | number, ...(IComponent | object)[]]; | ||
[key in keyof HTMLElementTagNameMap]?: string | number | IElement | [IAttrs, (IElement | string | number)[] | string | number, ...(IComponent | object)[]]; | ||
}; | ||
@@ -20,0 +20,0 @@ /** |
@@ -55,3 +55,3 @@ "use strict"; | ||
<${tag} ${content instanceof Array ? Object.entries(content[ATTRS]).map(([name, val]) => `${name}="${val}"`).join(' ') : ''}> | ||
${content instanceof Array ? (!((children = content[CHILDREN]) instanceof Array)) ? children : children.map(item => (typeof item === 'object') ? render(item) : item).join('') : content} | ||
${content instanceof Array ? (!((children = content[CHILDREN]) instanceof Array)) ? children : children.map(item => (typeof item === 'object') ? render(item) : item).join('') : (typeof content === 'object') ? render(content) : content} | ||
</${tag}>`)[0] || ''; | ||
@@ -107,2 +107,5 @@ } | ||
} | ||
else if (!(content instanceof Array)) { | ||
element.appendChild(build(content)); | ||
} | ||
else { | ||
@@ -109,0 +112,0 @@ for (let [name, value] of Object.entries(content[ATTRS])) { |
@@ -17,3 +17,3 @@ /** | ||
export type IElement = { | ||
[key in keyof HTMLElementTagNameMap]?: string | number | [IAttrs, (IElement | string | number)[] | string | number, ...(IComponent | object)[]]; | ||
[key in keyof HTMLElementTagNameMap]?: string | number | IElement | [IAttrs, (IElement | string | number)[] | string | number, ...(IComponent | object)[]]; | ||
}; | ||
@@ -20,0 +20,0 @@ /** |
@@ -52,3 +52,3 @@ /** | ||
<${tag} ${content instanceof Array ? Object.entries(content[ATTRS]).map(([name, val]) => `${name}="${val}"`).join(' ') : ''}> | ||
${content instanceof Array ? (!((children = content[CHILDREN]) instanceof Array)) ? children : children.map(item => (typeof item === 'object') ? render(item) : item).join('') : content} | ||
${content instanceof Array ? (!((children = content[CHILDREN]) instanceof Array)) ? children : children.map(item => (typeof item === 'object') ? render(item) : item).join('') : (typeof content === 'object') ? render(content) : content} | ||
</${tag}>`)[0] || ''; | ||
@@ -103,2 +103,5 @@ } | ||
} | ||
else if (!(content instanceof Array)) { | ||
element.appendChild(build(content)); | ||
} | ||
else { | ||
@@ -105,0 +108,0 @@ for (let [name, value] of Object.entries(content[ATTRS])) { |
{ | ||
"name": "deleight", | ||
"version": "5.2.14", | ||
"version": "5.2.15", | ||
"description": "A library with 9 modules for writing more expressive web applications with traditional HTML, CSS and JavaScript.", | ||
@@ -5,0 +5,0 @@ "type": "module", |
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
463831
13432