The smallest implementation of Mustache template engine.
Only 436 bytes gzipped.
mustache("Hello {{name}}!", {name: "world"})
// => Hello world!
- variables
{{escaped}}
,{{&unescaped}}
,{{{unescaped}}}
- sections
{{#section}}
- inverted sections
{{^inverted}}
- lambdas
{{#lambda}}
- comments
{{!comment}}
- partials
{{>partial}}
- variables dot notation
{{obj.prop}}
- tests
- set delimiter
{{=<% %>=}}
This library works in every modern browser. To use it in IE you will need a polyfill for Object.assign()
.