Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Next »

This a templating function (rather a library) that aligns with goals of doing things simply from first principles.

This is how one would use such a template:

var MAINtemplate=/*html*/`<p>$NAME$ has $$$ID$ - $Life$ - Everybody wishes they had more $$$$$</p>$`;

function MAINrun(){
   var Body = document.querySelector('body');
   var Data = [{ID : 55, NAME : " Fred <the knife>" }, {ID : 45 , NAME : "Mary"}];
   Body.innerHTML = TEMexpand(Data, MAINtemplate);
}

  • No labels