module.exports = [ // ============================== Rendering Different Data Input =========================== //Object { "name":"Render Data - Object", "data":{"name":"ashley"}, "template":{"<>":"div","html":"${name}"}, "html":"
ashley
" }, //Undefined { "name":"Render Data - Undefined", "data":undefined, "template":{"<>":"div","html":"${name}"}, "html":"" }, //Special characters in variable name $ _ - space { "name":"Render Data - Special Characters ($_-)", "data":{"$var":"$","_var":"_"," var":"space","-var":"-"}, "template":{"<>":"div","html":"${$var} ${_var} ${ var} ${-var}"}, "html":"
$ _ space -
" }, //Object Array { "name":"Render Data - Array", "data":[{"name":"ashley"},{"name":"monica"}], "template":{"<>":"div","html":"${name}"}, "html":"
ashley
monica
" }, //Literal Array { "name":"Render Data - Literal Array (Short Hand Literal)", "data":["ashley","monica"], "template":{"<>":"div","html":"${index}-${value}"}, "html":"
0-ashley
1-monica
" }, { "name":"Render Data - Literal Array (Inline Function - this)", "data":["ashley","monica"], "template":{"<>":"div","html":function(obj,index){return(index + "-" + this);}}, "html":"
0-ashley
1-monica
" }, { "name":"Render Data - Literal Array (Inline Function - (obj,index))", "data":["ashley","monica"], "template":{"<>":"div","html":(obj,index)=>(index + "-" + obj)}, "html":"
0-ashley
1-monica
" }, //Data - Literal { "name":"Data - Literal", "data":"ashley", "template":{"<>":"div"}, "html":"" }, // ============================== Non HTML Element (Block) =========================== { "name":"Block - Literal HTML", "data":{"name":"ashley"}, "template":{"html":"

${name}

"}, "html":"

ashley

" }, { "name":"Block - Inline Function HTML (this)", "data":{"name":"ashley"}, "template":{"html":function(){ return("

" + this.name +"

"); }}, "html":"

ashley

" }, { "name":"Block - Inline Function HTML (obj)", "data":{"name":"ashley"}, "template":{"html":(o)=>("

" + o.name +"

")}, "html":"

ashley

" }, { "name":"Block - Array Templates", "data":{"name":"ashley"}, "template":{"html":[ {"<>":"p","html":"${name}"} ]}, "html":"

ashley

" }, { "name":"Block - Sub Data (this)", "data":{"employee":{"name":"ashley"}}, "template":{"{}":function(){return(this.employee);},"html":"

${name}

"}, "html":"

ashley

" }, { "name":"Block - Sub Data (obj)", "data":{"employee":{"name":"ashley"}}, "template":{"{}":o=>o.employee,"html":"

${name}

"}, "html":"

ashley

" }, { "name":"Block - Literal Text", "data":{"name":"ashley"}, "template":{"text":"${name}"}, "html":"ashley" }, // ============================== Reserved Attributes =========================== //<> Attribute { "name":"<> Attribute - Literal", "data":{}, "template":{"<>":"div"}, "html":"
" }, { "name":"<> Attribute - Function", "data":{}, "template":{"<>":o=>"div"}, "html":"
" }, { "name":"<> Attribute - Dynamic", "data":{"element":"div","employee":{"name":"ashley"}}, "template":{"<>":"${element}","{}":o=>o.employee,"text":"${name}"}, "html":"
ashley
" }, //HTML Attribute { "name":"HTML Attribute - Nested Elements", "data":[{"name":"ashley"},{"name":"monica"}], "template":{"<>":"div","html":[{"<>":"span","html":"-"},{"<>":"strong","html":"${name}"}]}, "html":"
-ashley
-monica
" }, { "name":"HTML Attribute - Array Template", "data":[{"name":"ashley"},{"name":"monica"}], "template":[{"<>":"span","html":"-"},{"<>":"strong","html":"${name}"}], "html":"-ashley-monica" }, { "name":"HTML Attribute - Object", "data":{}, "template":{"<>":"div","html":{"name":"ashley"}}, "html":"
" }, { "name":"HTML Attribute - Inline Function (this / string)", "data":[{"name":"ashley"},{"name":"monica"}], "template":{"<>":"div","html":function(){return(this.name)}}, "html":"
ashley
monica
" }, { "name":"HTML Attribute - Inline Function (this / number)", "data":[{"val":1},{"val":2}], "template":{"<>":"div","html":function(){return(this.val)}}, "html":"
1
2
" }, { "name":"HTML Attribute - Inline Function (this / array)", "data":{"array":["ashley","monica"]}, "template":{"<>":"div","html":function(){return(this.array)}}, "html":"
ashley,monica
" }, { "name":"HTML Attribute - Inline Function (this / obj)", "data":{"object":{"name":"ashley"}}, "template":{"<>":"div","html":function(){return(this.object)}}, "html":"
" }, { "name":"HTML Attribute - Inline Function (obj / array)", "data":[{"name":"ashley"},{"name":"monica"}], "template":{"<>":"div","html":(o,index)=>(index + "-" + o.name)}, "html":"
0-ashley
1-monica
" }, { "name":"HTML Attribute - Inline Function (obj - object)", "data":{"name":"ashley"}, "template":{"<>":"div","html":(o,index)=>(index + "-" + o.name)}, "html":"
undefined-ashley
" }, //TEXT Attribute - Literal { "name":"Text Attribute - Literal (Non HTML String)", "data":{"text":"ashley"}, "template":{"<>":"div","text":"${text}"}, "html":"
ashley
" }, { "name":"Text Attribute - Literal (HTML String)", "data":{"text":"
ashley
"}, "template":{"<>":"div","text":"${text}"}, "html":"
<div>ashley</div>
" }, { "name":"Text Attribute Literal (Script XSS Attack)", "data":{"text":""}, "template":{"<>":"div","text":"${text}"}, "html":"
<script>console.log('xss');</script>
" }, { "name":"Text Attribute - Literal (All Special Characters)", "data":{"text":"&<>\"'\/"}, "template":{"<>":"div","text":"${text}"}, "html":"
&<>"'/
" }, //TEXT Attribute - Inline Function (this) { "name":"Text Attribute - Inline Function (this / Non HTML String)", "data":{"text":"ashley"}, "template":{"<>":"div","text":function(){return(this.text);}}, "html":"
ashley
" }, { "name":"Text Attribute - Inline Function (this / HTML String)", "data":{"text":"
ashley
"}, "template":{"<>":"div","text":function(){return(this.text);}}, "html":"
<div>ashley</div>
" }, { "name":"Text Attribute - Inline Literal (this / Script XSS Attack)", "data":{"text":""}, "template":{"<>":"div","text":function(){return(this.text);}}, "html":"
<script>console.log('xss');</script>
" }, { "name":"Text Attribute - Inline Literal (this / All Special Characters)", "data":{"text":"&<>\"'\/"}, "template":{"<>":"div","text":function(){return(this.text);}}, "html":"
&<>"'/
" }, //TEXT Attribute - Inline Function (obj) { "name":"Text Attribute - Inline Function (obj / Non HTML String)", "data":{"text":"ashley"}, "template":{"<>":"div","text":o=>o.text}, "html":"
ashley
" }, { "name":"Text Attribute - Inline Function (obj / HTML String)", "data":{"text":"
ashley
"}, "template":{"<>":"div","text":o=>o.text}, "html":"
<div>ashley</div>
" }, { "name":"Text Attribute - Inline Literal (obj / Script XSS Attack)", "data":{"text":""}, "template":{"<>":"div","text":o=>o.text}, "html":"
<script>console.log('xss');</script>
" }, { "name":"Text Attribute - Inline Literal (obj / All Special Characters)", "data":{"text":"&<>\"'\/"}, "template":{"<>":"div","text":o=>o.text}, "html":"
&<>"'/
" }, //TEXT Attribute - Inline Function (obj,index) { "name":"Text Attribute - Inline Function (Array / obj,index)", "data":[{"name":"ashley"},{"name":"monica"}], "template":{"<>":"div","text":(o,i)=>(i + "-" + o.name)}, "html":"
0-ashley
1-monica
" }, { "name":"Text Attribute - Inline Function (Object / obj,index)", "data":{"name":"ashley"}, "template":{"<>":"div","text":(o,i)=>(i + "-" + o.name)}, "html":"
undefined-ashley
" }, //DOM Attribute { "name":"DOM Attribute - Literal", "data":{}, "template":{"<>":"div","class":"bold"}, "html":"
" }, { "name":"DOM Attribute - Short Hand Literal", "data":{"class":"bold"}, "template":{"<>":"div","class":"${class}"}, "html":"
" }, { "name":"DOM Attribute - Inline Function (this)", "data":{"class":"bold"}, "template":{"<>":"div","class":function(){return(this.class);}}, "html":"
" }, { "name":"DOM Attribute - Inline Function (Array / (obj,index))", "data":[{"attr":"data"}], "template":{"<>":"div","data-attr":(o,i)=>(i + "-" + o.attr)}, "html":"
" }, { "name":"DOM Attribute - Inline Function (Object - (obj,index))", "data":{"attr":"data"}, "template":{"<>":"div","data-attr":(o,i)=>(i + "-" + o.attr)}, "html":"
" }, //{} Attribute { "name":"{} Attribute - Literal Object (NOT SUPPORTED)", "data":{"employee":{"name":"ashley"}}, "template":{"<>":"div","{}":"employee","html":"${name}"}, "html":"
" }, { "name":"{} Attribute - Undefined", "data":{"employee":{"name":"ashley"}}, "template":{"<>":"div","{}":o=>undefined}, "html":"" }, { "name":"{} Attribute - Inline Function (Object / this)", "data":{"employee":{"name":"ashley"}}, "template":{"<>":"div","{}":function(){return(this.employee);},"html":"${name}"}, "html":"
ashley
" }, { "name":"{} Attribute - Inline Function (Object / obj)", "data":{"employee":{"name":"ashley"}}, "template":{"<>":"div","{}":o=>o.employee,"html":"${name}"}, "html":"
ashley
" }, { "name":"{} Attribute - Inline Function (Array / this)", "data":{"employees":[{"name":"ashley"},{"name":"monica"}]}, "template":{"<>":"div","{}":function(){return(this.employees);},"html":"${name}"}, "html":"
ashley
monica
" }, { "name":"{} Attribute - Inline Function (Array / obj)", "data":{"employees":[{"name":"ashley"},{"name":"monica"}]}, "template":{"<>":"div","{}":o=>o.employees,"html":"${name}"}, "html":"
ashley
monica
" }, { "name":"{} Attribute - Embedded (Inline Function Array)", "data":{"employees":[{"name":"ashley"},{"name":"monica"}]}, "template":{"<>":"ul","html":[ {"<>":"li","{}":o=>o.employees,"html":"${name}"} ]}, "html":"" }, { "name":"{} Attribute - Embedded (Object)", "data":{}, "template":{"<>":"ul","html":[ {"<>":"li","{}":{"name":"ashley"},"text":"${name}"} ]}, "html":"" }, { "name":"{} Attribute - Embedded (Array)", "data":{}, "template":{"<>":"ul","html":[ {"<>":"li","{}":[{"name":"ashley"},{"name":"monica"}],"html":[ {"<>":"span","text":"${name}"}, {"<>":"i","text":(o,i,p)=>i} ]} ]}, "html":"" }, { "name":"{} Attribute - Embedded Children x2 (Inline Function Array)", "data":{"departments":[{"name":"catering","employees":["ashley","monica"]},{"name":"finance","employees":["monica"]}]}, "template":{"<>":"ul","html":[ {"<>":"li","{}":o=>o.departments,"html":[ {"<>":"h1","html":"${name}"}, {"<>":"div","{}":o=>o.employees,"html":[ {"<>":"span","html":"${value}"} ]} ]} ]}, "html":"" }, { "name":"obj DEPRECATED Attribute - Inline Function (Object - this)", "data":{"employee":{"name":"ashley"}}, "template":{"<>":"div","{}":function(){return(this.employee);},"html":"${name}"}, "html":"
ashley
" }, //Void Elements { "name":"Void Element - area", "data":{}, "template":{"<>":"area","attr":"test","html":"not displayed"}, "html":"" }, { "name":"Void Element - base", "data":{}, "template":{"<>":"base","attr":"test","html":"not displayed"}, "html":"" }, { "name":"Void Element - br", "data":{}, "template":{"<>":"br","attr":"test","html":"not displayed"}, "html":"
" }, { "name":"Void Element - col", "data":{}, "template":{"<>":"col","attr":"test","html":"not displayed"}, "html":"" }, { "name":"Void Element - command", "data":{}, "template":{"<>":"command","attr":"test","html":"not displayed"}, "html":"" }, { "name":"Void Element - embed", "data":{}, "template":{"<>":"embed","attr":"test","html":"not displayed"}, "html":"" }, { "name":"Void Element - hr", "data":{}, "template":{"<>":"hr","attr":"test","html":"not displayed"}, "html":"
" }, { "name":"Void Element - img", "data":{}, "template":{"<>":"img","attr":"test","html":"not displayed"}, "html":"" }, { "name":"Void Element - input", "data":{}, "template":{"<>":"input","attr":"test","html":"not displayed"}, "html":"" }, { "name":"Void Element - keygen", "data":{}, "template":{"<>":"keygen","attr":"test","html":"not displayed"}, "html":"" }, { "name":"Void Element - link", "data":{}, "template":{"<>":"link","attr":"test","html":"not displayed"}, "html":"" }, { "name":"Void Element - meta", "data":{}, "template":{"<>":"meta","attr":"test","html":"not displayed"}, "html":"" }, { "name":"Void Element - param", "data":{}, "template":{"<>":"param","attr":"test","html":"not displayed"}, "html":"" }, { "name":"Void Element - source", "data":{}, "template":{"<>":"source","attr":"test","html":"not displayed"}, "html":"" }, { "name":"Void Element - track", "data":{}, "template":{"<>":"track","attr":"test","html":"not displayed"}, "html":"" }, { "name":"Void Element - wbr", "data":{}, "template":{"<>":"wbr","attr":"test","html":"not displayed"}, "html":"" }, //Undefined / Null { "name":"Special Values - undefined", "data":{"val":undefined}, "template":{"<>":"div","html":"${val}"}, "html":"
" }, { "name":"Special Values - null", "data":{"val":null}, "template":{"<>":"div","html":"${val}"}, "html":"
" }, //Components { "name":"Components [A] - Parent Data Array", "components":{ "A/item":{"<>":"div","html":"${name}"} }, "data":[{"name":"ashley"},{"name":"monica"}], "template":{"[]":"A/item"}, "html":"
ashley
monica
" }, { "name":"Components [B] - Parent Sub Array", "components":{ "B/item":{"<>":"li","html":[ {"<>":"span","html":"${name}"} ]} }, "data":{"employees":[{"name":"ashley"},{"name":"monica"}]}, "template":{"<>":"ul","html":[ {"[]":"B/item","{}":o=>o.employees} ]}, "html":"" }, { "name":"Components [C] - Block Wrapper", "components":{ "C/wrapper":{"<>":"section","html":[ {"html":(o,i,d,h)=>h} ]} }, "data":{"employee":{"name":"ashley"}}, "template":{"[]":"C/wrapper","{}":o=>o.employee,"html":[ {"<>":"span","html":"${name}"} ]}, "html":"
ashley
" }, { "name":"Components [D] - Dynamic Component Name", "components":{ "D/name":{"<>":"span","html":"${name}"} }, "data":{"component":"D/name","employee":{"name":"ashley"}}, "template":{"[]":"${component}","{}":o=>o.employee}, "html":"ashley" }, { "name":"Components [E] - Undefined", "components":{ "E/item":{"<>":"div","html":"${name}"} }, "data":undefined, "template":{"[]":"E/item"}, "html":"" }, { "name":"Components [F] - Object undefined", "components":{ "F/name":{"<>":"span","html":"${name}"} }, "data":{}, "template":{"[]":"F/name","{}":o=>undefined}, "html":"" }, { "name":"Components [G] - Simple Property", "components":{ "G/name":{"<>":"span","text":(o,i,p)=>p.name} }, "data":{}, "template":{"[]":"G/name","name":"chad"}, "html":"chad" }, { "name":"Components [H] - Nested Properties", "components":{ "H/name":{"<>":"i","text":(o,i,p)=>p.name}, "H/user":{"<>":"div","html":[ {"<>":"span","text":(o,i,p)=>p.name}, {"[]":"H/name"} ]} }, "data":{}, "template":{"[]":"H/user","name":"chad"}, "html":"
chad
" }, { "name":"Components [I] - Shorthand Property", "components":{ "I/name":{"<>":"span","text":"${@name}"} }, "data":{}, "template":{"[]":"I/name","name":"chad"}, "html":"chad" }, { "name":"Components [J] - Nested Properties (Object)", "components":{ "J/text":{"<>":"span","text":"${@text}"}, "J/user":{"<>":"div","html":[ {"<>":"div","text":"${@user.name}"}, {"[]":"J/text","text":" "}, {"[]":"J/text","text":(o,i,p)=>p.user.name} ]} }, "data":{}, "template":{"[]":"J/user","user":{"name":"chad"}}, "html":"
chad
chad
" }, { "name":"Components [K] - Nested Properties (Array)", "components":{ "J/container":{"<>":"ul","html":[ {"<>":"li","{}":(o,i,p)=>p.users,"text":"${name}"} ]} }, "data":{}, "template":{"[]":"J/container","users":[{"name":"ashley"},{"name":"monica"}]}, "html":"" }, { "name":"Components [L] - Empty Property", "components":{ "L/text":{"<>":"span","text":"${@text}"}, }, "data":{}, "template":{"[]":"L/text"}, "html":"" } ];