Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

typed-dom

Package Overview
Dependencies
Maintainers
1
Versions
350
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typed-dom - npm Package Compare versions

Comparing version 0.0.0 to 0.0.1

34

dist/typed-dom.js

@@ -1,2 +0,2 @@

/*! typed-dom v0.0.0 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | MIT License (https://opensource.org/licenses/MIT) */
/*! typed-dom v0.0.1 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | MIT License (https://opensource.org/licenses/MIT) */
define = typeof define === 'function' && define.amd

@@ -893,2 +893,34 @@ ? define

},
article: function (children, factory) {
if (factory === void 0) {
factory = function () {
return document.createElement('article');
};
}
return build(factory, children);
},
aside: function (children, factory) {
if (factory === void 0) {
factory = function () {
return document.createElement('aside');
};
}
return build(factory, children);
},
nav: function (children, factory) {
if (factory === void 0) {
factory = function () {
return document.createElement('nav');
};
}
return build(factory, children);
},
section: function (children, factory) {
if (factory === void 0) {
factory = function () {
return document.createElement('section');
};
}
return build(factory, children);
},
untyped: function (children, factory) {

@@ -895,0 +927,0 @@ return build(factory, children);

4

dist/typed-dom.min.js

@@ -1,2 +0,2 @@

/*! typed-dom v0.0.0 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | MIT License (https://opensource.org/licenses/MIT) */
define="function"==typeof define&&define.amd?define:function(){"use strict";var n="typed-dom",e={};return function t(r,u,o){return o?void o.apply(this,u.map(function(n){switch(n){case"require":return"function"==typeof require?require:void 0;case"exports":return-1===r.indexOf("/")?e[r]="undefined"==typeof exports?self[r]=self[r]||{}:exports:e[r]=e.hasOwnProperty(r)?e[r]:{};default:return".d"===n.slice(-2)&&{}||e.hasOwnProperty(n)&&e[n]||"function"==typeof require&&require(n)||self[n]}})):void t(n,r,u)}}(),define("src/builder",["require","exports"],function(n,e){"use strict";function t(n,e){void 0===e&&(e=[]);var t=n();if(void Object.keys(e).forEach(function(n){return void t.appendChild(e[n].raw)}),e instanceof Array==!1){var r=e;e=Object.keys(e).reduce(function(n,e){return Object.defineProperty(n,e,{get:function(){return r[e]},set:function(n){var u=r[e];r[e]=n,t.replaceChild(n.raw,u.raw)}}),n},{})}return{raw:t,get contents(){return e},set contents(n){if(e instanceof Array==!1)throw new TypeError("TypedDOM: Children cannot update when its type is not an array.");e=n,t.innerHTML="",e.forEach(function(n){return t.appendChild(n.raw)})}}}e.TypedHTML={a:function(n,e){return void 0===e&&(e=function(){return document.createElement("a")}),t(e,n)},abbr:function(n,e){return void 0===e&&(e=function(){return document.createElement("abbr")}),t(e,n)},acronym:function(n,e){return void 0===e&&(e=function(){return document.createElement("acronym")}),t(e,n)},address:function(n,e){return void 0===e&&(e=function(){return document.createElement("address")}),t(e,n)},applet:function(n,e){return void 0===e&&(e=function(){return document.createElement("applet")}),t(e,n)},area:function(n,e){return void 0===e&&(e=function(){return document.createElement("area")}),t(e,n)},audio:function(n,e){return void 0===e&&(e=function(){return document.createElement("audio")}),t(e,n)},b:function(n,e){return void 0===e&&(e=function(){return document.createElement("b")}),t(e,n)},base:function(n,e){return void 0===e&&(e=function(){return document.createElement("base")}),t(e,n)},basefont:function(n,e){return void 0===e&&(e=function(){return document.createElement("basefont")}),t(e,n)},bdo:function(n,e){return void 0===e&&(e=function(){return document.createElement("bdo")}),t(e,n)},big:function(n,e){return void 0===e&&(e=function(){return document.createElement("big")}),t(e,n)},blockquote:function(n,e){return void 0===e&&(e=function(){return document.createElement("blockquote")}),t(e,n)},body:function(n,e){return void 0===e&&(e=function(){return document.createElement("body")}),t(e,n)},br:function(n,e){return void 0===e&&(e=function(){return document.createElement("br")}),t(e,n)},button:function(n,e){return void 0===e&&(e=function(){return document.createElement("button")}),t(e,n)},canvas:function(n,e){return void 0===e&&(e=function(){return document.createElement("canvas")}),t(e,n)},caption:function(n,e){return void 0===e&&(e=function(){return document.createElement("caption")}),t(e,n)},center:function(n,e){return void 0===e&&(e=function(){return document.createElement("center")}),t(e,n)},cite:function(n,e){return void 0===e&&(e=function(){return document.createElement("cite")}),t(e,n)},code:function(n,e){return void 0===e&&(e=function(){return document.createElement("code")}),t(e,n)},col:function(n,e){return void 0===e&&(e=function(){return document.createElement("col")}),t(e,n)},colgroup:function(n,e){return void 0===e&&(e=function(){return document.createElement("colgroup")}),t(e,n)},datalist:function(n,e){return void 0===e&&(e=function(){return document.createElement("datalist")}),t(e,n)},dd:function(n,e){return void 0===e&&(e=function(){return document.createElement("dd")}),t(e,n)},del:function(n,e){return void 0===e&&(e=function(){return document.createElement("del")}),t(e,n)},dfn:function(n,e){return void 0===e&&(e=function(){return document.createElement("dfn")}),t(e,n)},dir:function(n,e){return void 0===e&&(e=function(){return document.createElement("dir")}),t(e,n)},div:function(n,e){return void 0===e&&(e=function(){return document.createElement("div")}),t(e,n)},dl:function(n,e){return void 0===e&&(e=function(){return document.createElement("dl")}),t(e,n)},dt:function(n,e){return void 0===e&&(e=function(){return document.createElement("dt")}),t(e,n)},em:function(n,e){return void 0===e&&(e=function(){return document.createElement("em")}),t(e,n)},embed:function(n,e){return void 0===e&&(e=function(){return document.createElement("embed")}),t(e,n)},fieldset:function(n,e){return void 0===e&&(e=function(){return document.createElement("fieldset")}),t(e,n)},font:function(n,e){return void 0===e&&(e=function(){return document.createElement("font")}),t(e,n)},form:function(n,e){return void 0===e&&(e=function(){return document.createElement("form")}),t(e,n)},frame:function(n,e){return void 0===e&&(e=function(){return document.createElement("frame")}),t(e,n)},frameset:function(n,e){return void 0===e&&(e=function(){return document.createElement("frameset")}),t(e,n)},h1:function(n,e){return void 0===e&&(e=function(){return document.createElement("h1")}),t(e,n)},h2:function(n,e){return void 0===e&&(e=function(){return document.createElement("h2")}),t(e,n)},h3:function(n,e){return void 0===e&&(e=function(){return document.createElement("h3")}),t(e,n)},h4:function(n,e){return void 0===e&&(e=function(){return document.createElement("h4")}),t(e,n)},h5:function(n,e){return void 0===e&&(e=function(){return document.createElement("h5")}),t(e,n)},h6:function(n,e){return void 0===e&&(e=function(){return document.createElement("h6")}),t(e,n)},head:function(n,e){return void 0===e&&(e=function(){return document.createElement("head")}),t(e,n)},hr:function(n,e){return void 0===e&&(e=function(){return document.createElement("hr")}),t(e,n)},html:function(n,e){return void 0===e&&(e=function(){return document.createElement("html")}),t(e,n)},i:function(n,e){return void 0===e&&(e=function(){return document.createElement("i")}),t(e,n)},iframe:function(n,e){return void 0===e&&(e=function(){return document.createElement("iframe")}),t(e,n)},img:function(n,e){return void 0===e&&(e=function(){return document.createElement("img")}),t(e,n)},input:function(n,e){return void 0===e&&(e=function(){return document.createElement("input")}),t(e,n)},ins:function(n,e){return void 0===e&&(e=function(){return document.createElement("ins")}),t(e,n)},isindex:function(n,e){return void 0===e&&(e=function(){return document.createElement("isindex")}),t(e,n)},kbd:function(n,e){return void 0===e&&(e=function(){return document.createElement("kbd")}),t(e,n)},keygen:function(n,e){return void 0===e&&(e=function(){return document.createElement("keygen")}),t(e,n)},label:function(n,e){return void 0===e&&(e=function(){return document.createElement("label")}),t(e,n)},legend:function(n,e){return void 0===e&&(e=function(){return document.createElement("legend")}),t(e,n)},li:function(n,e){return void 0===e&&(e=function(){return document.createElement("li")}),t(e,n)},link:function(n,e){return void 0===e&&(e=function(){return document.createElement("link")}),t(e,n)},listing:function(n,e){return void 0===e&&(e=function(){return document.createElement("listing")}),t(e,n)},map:function(n,e){return void 0===e&&(e=function(){return document.createElement("map")}),t(e,n)},marquee:function(n,e){return void 0===e&&(e=function(){return document.createElement("marquee")}),t(e,n)},menu:function(n,e){return void 0===e&&(e=function(){return document.createElement("menu")}),t(e,n)},meta:function(n,e){return void 0===e&&(e=function(){return document.createElement("meta")}),t(e,n)},nextid:function(n,e){return void 0===e&&(e=function(){return document.createElement("nextid")}),t(e,n)},nobr:function(n,e){return void 0===e&&(e=function(){return document.createElement("nobr")}),t(e,n)},object:function(n,e){return void 0===e&&(e=function(){return document.createElement("object")}),t(e,n)},ol:function(n,e){return void 0===e&&(e=function(){return document.createElement("ol")}),t(e,n)},optgroup:function(n,e){return void 0===e&&(e=function(){return document.createElement("optgroup")}),t(e,n)},option:function(n,e){return void 0===e&&(e=function(){return document.createElement("option")}),t(e,n)},p:function(n,e){return void 0===e&&(e=function(){return document.createElement("p")}),t(e,n)},param:function(n,e){return void 0===e&&(e=function(){return document.createElement("param")}),t(e,n)},picture:function(n,e){return void 0===e&&(e=function(){return document.createElement("picture")}),t(e,n)},plaintext:function(n,e){return void 0===e&&(e=function(){return document.createElement("plaintext")}),t(e,n)},pre:function(n,e){return void 0===e&&(e=function(){return document.createElement("pre")}),t(e,n)},progress:function(n,e){return void 0===e&&(e=function(){return document.createElement("progress")}),t(e,n)},q:function(n,e){return void 0===e&&(e=function(){return document.createElement("q")}),t(e,n)},rt:function(n,e){return void 0===e&&(e=function(){return document.createElement("rt")}),t(e,n)},ruby:function(n,e){return void 0===e&&(e=function(){return document.createElement("ruby")}),t(e,n)},s:function(n,e){return void 0===e&&(e=function(){return document.createElement("s")}),t(e,n)},samp:function(n,e){return void 0===e&&(e=function(){return document.createElement("samp")}),t(e,n)},script:function(n,e){return void 0===e&&(e=function(){return document.createElement("script")}),t(e,n)},select:function(n,e){return void 0===e&&(e=function(){return document.createElement("select")}),t(e,n)},small:function(n,e){return void 0===e&&(e=function(){return document.createElement("small")}),t(e,n)},source:function(n,e){return void 0===e&&(e=function(){return document.createElement("source")}),t(e,n)},span:function(n,e){return void 0===e&&(e=function(){return document.createElement("span")}),t(e,n)},strike:function(n,e){return void 0===e&&(e=function(){return document.createElement("strike")}),t(e,n)},strong:function(n,e){return void 0===e&&(e=function(){return document.createElement("strong")}),t(e,n)},style:function(n,e){return void 0===e&&(e=function(){return document.createElement("style")}),t(e,n)},sub:function(n,e){return void 0===e&&(e=function(){return document.createElement("sub")}),t(e,n)},sup:function(n,e){return void 0===e&&(e=function(){return document.createElement("sup")}),t(e,n)},table:function(n,e){return void 0===e&&(e=function(){return document.createElement("table")}),t(e,n)},tbody:function(n,e){return void 0===e&&(e=function(){return document.createElement("tbody")}),t(e,n)},td:function(n,e){return void 0===e&&(e=function(){return document.createElement("td")}),t(e,n)},textarea:function(n,e){return void 0===e&&(e=function(){return document.createElement("textarea")}),t(e,n)},tfoot:function(n,e){return void 0===e&&(e=function(){return document.createElement("tfoot")}),t(e,n)},th:function(n,e){return void 0===e&&(e=function(){return document.createElement("th")}),t(e,n)},thead:function(n,e){return void 0===e&&(e=function(){return document.createElement("thead")}),t(e,n)},title:function(n,e){return void 0===e&&(e=function(){return document.createElement("title")}),t(e,n)},tr:function(n,e){return void 0===e&&(e=function(){return document.createElement("tr")}),t(e,n)},track:function(n,e){return void 0===e&&(e=function(){return document.createElement("track")}),t(e,n)},tt:function(n,e){return void 0===e&&(e=function(){return document.createElement("tt")}),t(e,n)},u:function(n,e){return void 0===e&&(e=function(){return document.createElement("u")}),t(e,n)},ul:function(n,e){return void 0===e&&(e=function(){return document.createElement("ul")}),t(e,n)},"var":function(n,e){return void 0===e&&(e=function(){return document.createElement("var")}),t(e,n)},video:function(n,e){return void 0===e&&(e=function(){return document.createElement("video")}),t(e,n)},xmp:function(n,e){return void 0===e&&(e=function(){return document.createElement("xmp")}),t(e,n)},untyped:function(n,e){return t(e,n)}}}),define("src/export",["require","exports","src/builder"],function(n,e,t){"use strict";e["default"]=t.TypedHTML}),define("typed-dom",["require","exports","src/export","src/export"],function(n,e,t,r){"use strict";function u(n){for(var t in n)e.hasOwnProperty(t)||(e[t]=n[t])}u(t),e["default"]=r["default"]});
/*! typed-dom v0.0.1 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | MIT License (https://opensource.org/licenses/MIT) */
define="function"==typeof define&&define.amd?define:function(){"use strict";var n="typed-dom",e={};return function t(r,u,o){return o?void o.apply(this,u.map(function(n){switch(n){case"require":return"function"==typeof require?require:void 0;case"exports":return-1===r.indexOf("/")?e[r]="undefined"==typeof exports?self[r]=self[r]||{}:exports:e[r]=e.hasOwnProperty(r)?e[r]:{};default:return".d"===n.slice(-2)&&{}||e.hasOwnProperty(n)&&e[n]||"function"==typeof require&&require(n)||self[n]}})):void t(n,r,u)}}(),define("src/builder",["require","exports"],function(n,e){"use strict";function t(n,e){void 0===e&&(e=[]);var t=n();if(void Object.keys(e).forEach(function(n){return void t.appendChild(e[n].raw)}),e instanceof Array==!1){var r=e;e=Object.keys(e).reduce(function(n,e){return Object.defineProperty(n,e,{get:function(){return r[e]},set:function(n){var u=r[e];r[e]=n,t.replaceChild(n.raw,u.raw)}}),n},{})}return{raw:t,get contents(){return e},set contents(n){if(e instanceof Array==!1)throw new TypeError("TypedDOM: Children cannot update when its type is not an array.");e=n,t.innerHTML="",e.forEach(function(n){return t.appendChild(n.raw)})}}}e.TypedHTML={a:function(n,e){return void 0===e&&(e=function(){return document.createElement("a")}),t(e,n)},abbr:function(n,e){return void 0===e&&(e=function(){return document.createElement("abbr")}),t(e,n)},acronym:function(n,e){return void 0===e&&(e=function(){return document.createElement("acronym")}),t(e,n)},address:function(n,e){return void 0===e&&(e=function(){return document.createElement("address")}),t(e,n)},applet:function(n,e){return void 0===e&&(e=function(){return document.createElement("applet")}),t(e,n)},area:function(n,e){return void 0===e&&(e=function(){return document.createElement("area")}),t(e,n)},audio:function(n,e){return void 0===e&&(e=function(){return document.createElement("audio")}),t(e,n)},b:function(n,e){return void 0===e&&(e=function(){return document.createElement("b")}),t(e,n)},base:function(n,e){return void 0===e&&(e=function(){return document.createElement("base")}),t(e,n)},basefont:function(n,e){return void 0===e&&(e=function(){return document.createElement("basefont")}),t(e,n)},bdo:function(n,e){return void 0===e&&(e=function(){return document.createElement("bdo")}),t(e,n)},big:function(n,e){return void 0===e&&(e=function(){return document.createElement("big")}),t(e,n)},blockquote:function(n,e){return void 0===e&&(e=function(){return document.createElement("blockquote")}),t(e,n)},body:function(n,e){return void 0===e&&(e=function(){return document.createElement("body")}),t(e,n)},br:function(n,e){return void 0===e&&(e=function(){return document.createElement("br")}),t(e,n)},button:function(n,e){return void 0===e&&(e=function(){return document.createElement("button")}),t(e,n)},canvas:function(n,e){return void 0===e&&(e=function(){return document.createElement("canvas")}),t(e,n)},caption:function(n,e){return void 0===e&&(e=function(){return document.createElement("caption")}),t(e,n)},center:function(n,e){return void 0===e&&(e=function(){return document.createElement("center")}),t(e,n)},cite:function(n,e){return void 0===e&&(e=function(){return document.createElement("cite")}),t(e,n)},code:function(n,e){return void 0===e&&(e=function(){return document.createElement("code")}),t(e,n)},col:function(n,e){return void 0===e&&(e=function(){return document.createElement("col")}),t(e,n)},colgroup:function(n,e){return void 0===e&&(e=function(){return document.createElement("colgroup")}),t(e,n)},datalist:function(n,e){return void 0===e&&(e=function(){return document.createElement("datalist")}),t(e,n)},dd:function(n,e){return void 0===e&&(e=function(){return document.createElement("dd")}),t(e,n)},del:function(n,e){return void 0===e&&(e=function(){return document.createElement("del")}),t(e,n)},dfn:function(n,e){return void 0===e&&(e=function(){return document.createElement("dfn")}),t(e,n)},dir:function(n,e){return void 0===e&&(e=function(){return document.createElement("dir")}),t(e,n)},div:function(n,e){return void 0===e&&(e=function(){return document.createElement("div")}),t(e,n)},dl:function(n,e){return void 0===e&&(e=function(){return document.createElement("dl")}),t(e,n)},dt:function(n,e){return void 0===e&&(e=function(){return document.createElement("dt")}),t(e,n)},em:function(n,e){return void 0===e&&(e=function(){return document.createElement("em")}),t(e,n)},embed:function(n,e){return void 0===e&&(e=function(){return document.createElement("embed")}),t(e,n)},fieldset:function(n,e){return void 0===e&&(e=function(){return document.createElement("fieldset")}),t(e,n)},font:function(n,e){return void 0===e&&(e=function(){return document.createElement("font")}),t(e,n)},form:function(n,e){return void 0===e&&(e=function(){return document.createElement("form")}),t(e,n)},frame:function(n,e){return void 0===e&&(e=function(){return document.createElement("frame")}),t(e,n)},frameset:function(n,e){return void 0===e&&(e=function(){return document.createElement("frameset")}),t(e,n)},h1:function(n,e){return void 0===e&&(e=function(){return document.createElement("h1")}),t(e,n)},h2:function(n,e){return void 0===e&&(e=function(){return document.createElement("h2")}),t(e,n)},h3:function(n,e){return void 0===e&&(e=function(){return document.createElement("h3")}),t(e,n)},h4:function(n,e){return void 0===e&&(e=function(){return document.createElement("h4")}),t(e,n)},h5:function(n,e){return void 0===e&&(e=function(){return document.createElement("h5")}),t(e,n)},h6:function(n,e){return void 0===e&&(e=function(){return document.createElement("h6")}),t(e,n)},head:function(n,e){return void 0===e&&(e=function(){return document.createElement("head")}),t(e,n)},hr:function(n,e){return void 0===e&&(e=function(){return document.createElement("hr")}),t(e,n)},html:function(n,e){return void 0===e&&(e=function(){return document.createElement("html")}),t(e,n)},i:function(n,e){return void 0===e&&(e=function(){return document.createElement("i")}),t(e,n)},iframe:function(n,e){return void 0===e&&(e=function(){return document.createElement("iframe")}),t(e,n)},img:function(n,e){return void 0===e&&(e=function(){return document.createElement("img")}),t(e,n)},input:function(n,e){return void 0===e&&(e=function(){return document.createElement("input")}),t(e,n)},ins:function(n,e){return void 0===e&&(e=function(){return document.createElement("ins")}),t(e,n)},isindex:function(n,e){return void 0===e&&(e=function(){return document.createElement("isindex")}),t(e,n)},kbd:function(n,e){return void 0===e&&(e=function(){return document.createElement("kbd")}),t(e,n)},keygen:function(n,e){return void 0===e&&(e=function(){return document.createElement("keygen")}),t(e,n)},label:function(n,e){return void 0===e&&(e=function(){return document.createElement("label")}),t(e,n)},legend:function(n,e){return void 0===e&&(e=function(){return document.createElement("legend")}),t(e,n)},li:function(n,e){return void 0===e&&(e=function(){return document.createElement("li")}),t(e,n)},link:function(n,e){return void 0===e&&(e=function(){return document.createElement("link")}),t(e,n)},listing:function(n,e){return void 0===e&&(e=function(){return document.createElement("listing")}),t(e,n)},map:function(n,e){return void 0===e&&(e=function(){return document.createElement("map")}),t(e,n)},marquee:function(n,e){return void 0===e&&(e=function(){return document.createElement("marquee")}),t(e,n)},menu:function(n,e){return void 0===e&&(e=function(){return document.createElement("menu")}),t(e,n)},meta:function(n,e){return void 0===e&&(e=function(){return document.createElement("meta")}),t(e,n)},nextid:function(n,e){return void 0===e&&(e=function(){return document.createElement("nextid")}),t(e,n)},nobr:function(n,e){return void 0===e&&(e=function(){return document.createElement("nobr")}),t(e,n)},object:function(n,e){return void 0===e&&(e=function(){return document.createElement("object")}),t(e,n)},ol:function(n,e){return void 0===e&&(e=function(){return document.createElement("ol")}),t(e,n)},optgroup:function(n,e){return void 0===e&&(e=function(){return document.createElement("optgroup")}),t(e,n)},option:function(n,e){return void 0===e&&(e=function(){return document.createElement("option")}),t(e,n)},p:function(n,e){return void 0===e&&(e=function(){return document.createElement("p")}),t(e,n)},param:function(n,e){return void 0===e&&(e=function(){return document.createElement("param")}),t(e,n)},picture:function(n,e){return void 0===e&&(e=function(){return document.createElement("picture")}),t(e,n)},plaintext:function(n,e){return void 0===e&&(e=function(){return document.createElement("plaintext")}),t(e,n)},pre:function(n,e){return void 0===e&&(e=function(){return document.createElement("pre")}),t(e,n)},progress:function(n,e){return void 0===e&&(e=function(){return document.createElement("progress")}),t(e,n)},q:function(n,e){return void 0===e&&(e=function(){return document.createElement("q")}),t(e,n)},rt:function(n,e){return void 0===e&&(e=function(){return document.createElement("rt")}),t(e,n)},ruby:function(n,e){return void 0===e&&(e=function(){return document.createElement("ruby")}),t(e,n)},s:function(n,e){return void 0===e&&(e=function(){return document.createElement("s")}),t(e,n)},samp:function(n,e){return void 0===e&&(e=function(){return document.createElement("samp")}),t(e,n)},script:function(n,e){return void 0===e&&(e=function(){return document.createElement("script")}),t(e,n)},select:function(n,e){return void 0===e&&(e=function(){return document.createElement("select")}),t(e,n)},small:function(n,e){return void 0===e&&(e=function(){return document.createElement("small")}),t(e,n)},source:function(n,e){return void 0===e&&(e=function(){return document.createElement("source")}),t(e,n)},span:function(n,e){return void 0===e&&(e=function(){return document.createElement("span")}),t(e,n)},strike:function(n,e){return void 0===e&&(e=function(){return document.createElement("strike")}),t(e,n)},strong:function(n,e){return void 0===e&&(e=function(){return document.createElement("strong")}),t(e,n)},style:function(n,e){return void 0===e&&(e=function(){return document.createElement("style")}),t(e,n)},sub:function(n,e){return void 0===e&&(e=function(){return document.createElement("sub")}),t(e,n)},sup:function(n,e){return void 0===e&&(e=function(){return document.createElement("sup")}),t(e,n)},table:function(n,e){return void 0===e&&(e=function(){return document.createElement("table")}),t(e,n)},tbody:function(n,e){return void 0===e&&(e=function(){return document.createElement("tbody")}),t(e,n)},td:function(n,e){return void 0===e&&(e=function(){return document.createElement("td")}),t(e,n)},textarea:function(n,e){return void 0===e&&(e=function(){return document.createElement("textarea")}),t(e,n)},tfoot:function(n,e){return void 0===e&&(e=function(){return document.createElement("tfoot")}),t(e,n)},th:function(n,e){return void 0===e&&(e=function(){return document.createElement("th")}),t(e,n)},thead:function(n,e){return void 0===e&&(e=function(){return document.createElement("thead")}),t(e,n)},title:function(n,e){return void 0===e&&(e=function(){return document.createElement("title")}),t(e,n)},tr:function(n,e){return void 0===e&&(e=function(){return document.createElement("tr")}),t(e,n)},track:function(n,e){return void 0===e&&(e=function(){return document.createElement("track")}),t(e,n)},tt:function(n,e){return void 0===e&&(e=function(){return document.createElement("tt")}),t(e,n)},u:function(n,e){return void 0===e&&(e=function(){return document.createElement("u")}),t(e,n)},ul:function(n,e){return void 0===e&&(e=function(){return document.createElement("ul")}),t(e,n)},"var":function(n,e){return void 0===e&&(e=function(){return document.createElement("var")}),t(e,n)},video:function(n,e){return void 0===e&&(e=function(){return document.createElement("video")}),t(e,n)},xmp:function(n,e){return void 0===e&&(e=function(){return document.createElement("xmp")}),t(e,n)},article:function(n,e){return void 0===e&&(e=function(){return document.createElement("article")}),t(e,n)},aside:function(n,e){return void 0===e&&(e=function(){return document.createElement("aside")}),t(e,n)},nav:function(n,e){return void 0===e&&(e=function(){return document.createElement("nav")}),t(e,n)},section:function(n,e){return void 0===e&&(e=function(){return document.createElement("section")}),t(e,n)},untyped:function(n,e){return t(e,n)}}}),define("src/export",["require","exports","src/builder"],function(n,e,t){"use strict";e["default"]=t.TypedHTML}),define("typed-dom",["require","exports","src/export","src/export"],function(n,e,t,r){"use strict";function u(n){for(var t in n)e.hasOwnProperty(t)||(e[t]=n[t])}u(t),e["default"]=r["default"]});
{
"name": "typed-dom",
"version": "0.0.0",
"version": "0.0.1",
"description": "Typed html dom structs.",

@@ -5,0 +5,0 @@ "private": false,

@@ -646,2 +646,26 @@ import {default as Builder, TypedHTMLElement, TypedHTMLElementChildren} from 'typed-dom';

},
article
<T extends TypedHTMLElementChildren<HTMLElement>>
(children?: T, factory: () => HTMLElement = () => document.createElement('article'))
: TypedHTMLElement<HTMLElement, T> {
return build(factory, children);
},
aside
<T extends TypedHTMLElementChildren<HTMLElement>>
(children?: T, factory: () => HTMLElement = () => document.createElement('aside'))
: TypedHTMLElement<HTMLElement, T> {
return build(factory, children);
},
nav
<T extends TypedHTMLElementChildren<HTMLElement>>
(children?: T, factory: () => HTMLElement = () => document.createElement('nav'))
: TypedHTMLElement<HTMLElement, T> {
return build(factory, children);
},
section
<T extends TypedHTMLElementChildren<HTMLElement>>
(children?: T, factory: () => HTMLElement = () => document.createElement('section'))
: TypedHTMLElement<HTMLElement, T> {
return build(factory, children);
},
untyped

@@ -648,0 +672,0 @@ <T extends TypedHTMLElementChildren<HTMLElement>, U extends HTMLElement>

@@ -20,2 +20,3 @@ /**

const TypedHTML: {
// lib.d.ts
a: TypedHTMLElementBuilder<HTMLAnchorElement>;

@@ -128,2 +129,8 @@ abbr: TypedHTMLElementBuilder<HTMLPhraseElement>;

xmp: TypedHTMLElementBuilder<HTMLBlockElement>;
// sectioning contents
article: TypedHTMLElementBuilder<HTMLElement>;
aside: TypedHTMLElementBuilder<HTMLElement>;
nav: TypedHTMLElementBuilder<HTMLElement>;
section: TypedHTMLElementBuilder<HTMLElement>;
// untyped
untyped<T extends TypedHTMLElementChildren<HTMLElement>, U extends HTMLElement>(children: T, factory: () => U): TypedHTMLElement<U, T>;

@@ -130,0 +137,0 @@ };

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc