@duckafire/html.js 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/html.js +2 -2
  2. package/html.min.js +1 -1
  3. package/package.json +1 -1
package/html.js CHANGED
@@ -63,7 +63,7 @@ const __htmljs_core__ = (elementTag, htmlProperties, ...children) =>
63
63
  throw new TypeError(`Excepting Object to \`htmlProperties\`, instead "${typeof htmlProperties}".`);
64
64
 
65
65
  for(const property in htmlProperties)
66
- ELEM[property] = htmlProperties[property]
66
+ ELEM[property] = htmlProperties[property];
67
67
  }
68
68
 
69
69
  for(let i = 0; i < ARGS_MAX; i++)
@@ -94,7 +94,7 @@ const __htmljs_core__ = (elementTag, htmlProperties, ...children) =>
94
94
  }
95
95
  }
96
96
 
97
- if(textnode !== null)
97
+ if(textnode != "")
98
98
  ELEM.appendChild(document.createTextNode( textnode ));
99
99
  }
100
100
 
package/html.min.js CHANGED
@@ -1 +1 @@
1
- "use strict";let __htmljs_ignore_last__=1;const __htmljs_is_not_object__=t=>"object"!=typeof t||Array.isArray(t),__htmljs_element_tags__=["area","base","br","col","hr","img","input","link","meta","source","track","wbr","a","abbr","address","article","audio","b","bdi","bdo","blockquote","body","button","canvas","caption","cite","code","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","html","i","iframe","ins","kbd","label","legend","li","main","map","mark","meter","nav","noscript","object","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","samp","script","section","select","small","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","ul","var","video"],__htmljs_core__=(t,e,...o)=>{const r=document.createElement(t);if(void 0!==e){let t="";const _=o.length-__htmljs_ignore_last__;if(null!==e){if(__htmljs_is_not_object__(e))throw new TypeError(`Excepting Object to \`htmlProperties\`, instead "${typeof e}".`);for(const t in e)r[t]=e[t]}for(let e=0;e<_;e++)if("string"!=typeof o[e]){if(__htmljs_is_not_object__(o[e]))throw new TypeError(`Excepting Object or String to \`children[${e}]\`, instead "${typeof o[e]}".`);""!=t&&(r.appendChild(document.createTextNode(t)),t="");try{r.appendChild(o[e])}catch(t){console.error(t);break}}else t+=(""==t?"":" ")+o[e];null!==t&&r.appendChild(document.createTextNode(t))}return r},htmljs_set_ignore_last=t=>{__htmljs_ignore_last__=t?1:0},declare_htmljs=(t,e,o)=>{const r=e?{}:window,_=t||"";let l;return __htmljs_element_tags__.forEach((t,e)=>{l=_+t,r[o?l.toUpperCase():l]=e<12?e=>__htmljs_core__(t,e):(e,...o)=>__htmljs_core__(t,e,...o)}),r};
1
+ "use strict";let __htmljs_ignore_last__=1;const __htmljs_is_not_object__=t=>"object"!=typeof t||Array.isArray(t),__htmljs_element_tags__=["area","base","br","col","hr","img","input","link","meta","source","track","wbr","a","abbr","address","article","audio","b","bdi","bdo","blockquote","body","button","canvas","caption","cite","code","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","html","i","iframe","ins","kbd","label","legend","li","main","map","mark","meter","nav","noscript","object","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","samp","script","section","select","small","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","ul","var","video"],__htmljs_core__=(t,e,...o)=>{const r=document.createElement(t);if(void 0!==e){let t="";const _=o.length-__htmljs_ignore_last__;if(null!==e){if(__htmljs_is_not_object__(e))throw new TypeError(`Excepting Object to \`htmlProperties\`, instead "${typeof e}".`);for(const t in e)r[t]=e[t]}for(let e=0;e<_;e++)if("string"!=typeof o[e]){if(__htmljs_is_not_object__(o[e]))throw new TypeError(`Excepting Object or String to \`children[${e}]\`, instead "${typeof o[e]}".`);""!=t&&(r.appendChild(document.createTextNode(t)),t="");try{r.appendChild(o[e])}catch(t){console.error(t);break}}else t+=(""==t?"":" ")+o[e];""!=t&&r.appendChild(document.createTextNode(t))}return r},htmljs_set_ignore_last=t=>{__htmljs_ignore_last__=t?1:0},declare_htmljs=(t,e,o)=>{const r=e?{}:window,_=t||"";let s;return __htmljs_element_tags__.forEach((t,e)=>{s=_+t,r[o?s.toUpperCase():s]=e<12?e=>__htmljs_core__(t,e):(e,...o)=>__htmljs_core__(t,e,...o)}),r};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@duckafire/html.js",
3
3
  "author": "duckafire",
4
- "version": "0.0.3",
4
+ "version": "0.0.4",
5
5
  "license": "Zlib",
6
6
  "description": "Just a very simple components library.",
7
7
  "keywords": ["front-end", "client", "html", "dom", "light", "components", "web", "simple", "minimalist", "easy"],