trisquel
Simple, customizable template engine for JavaScript
Installation
npm install trisquel --save
Example data
var data =foo: 'bar'crash:test: 'dummy'list: 'foo' 'bar' 'foobar'map:hi: 'all'bye: 'nobody';
Caching templates
template;template;// cached templates can be invoked with $include{}console;// returns 'map: [bar:hi:all][bar:bye:nobody]'console;// returns 'list: [bar:0:foo][bar:1:bar][bar:2:foobar]'
Filters
template;console;// returns '5 meses'console;// returns '1 mes'
var messagesgreeting:;template;console;// returns 'Smith: Hi John!'
Tests
npm test