npm.io
1.0.0 • Published 11 years ago

templut

Licence
ISC
Version
1.0.0
Deps
0
Vulns
0
Weekly
0

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?