Tiny library to generate template with data binding.
Template:
<div id="content">
<h1>{{ title }}</h1>
<img src="https://github.com/rendfall/test-templates/raw/master/{{ link }}" />
<p>{{ nodef }}</p>
</div>
Render:
var $content = document.getElementById('content');
$content.innerHTML = Template.compile($content.innerHTML, {
title: 'This is an example',
link: 'http://fakeimg.pl/250x100/ff0000/'
});
$ npm test