hoquet
JavaScript HTML templating with s-expressions.
Installation
Install with npm:
$ npm install --save hoquet
Example
var hoquet = ; { return "html" "head" "title" ctitle cstyles chead "body" cbody ;} var index = ;
API
.render
function that takes a structured array or a variable list of structured arrays and converts them into a String of HTML.
e.g.
var hoquet = ; hoquet; // <p>foo</p><p>bar</p> hoquet; // <p>foo</p><p>bar</p> hoquet; // <p>foo</p><p>bar</p> hoquet; // <p>This is a <span>paragraph</span> with a span</p> hoquet; //<div id="foo" class="bar"></div> hoquet; // <meta foo="bar" /> hoquet; // <ul><li>bread</li><li>milk</li><li>eggs</li></ul>
for more specifics, see
./test/test.js
Testing
From the repo root:
npm install
npm test
License
MIT