templut

handlebars-like templating

Usage no npm install needed!

<script type="module">
  import templut from 'https://cdn.skypack.dev/templut';
</script>

README

handlebars-like templating

var templater = new templut();
templater.filter('capitalise', function(string) {
    return string.charAt(0).toUpperCase() + string.slice(1);
});

var html = templater.replace('hi there {{name|capitalise}}. {{greeting}}', {
    name: 'fergus',
    greeting: 'How are you?'
});

returns

hi there Fergus. How are you?