A fork of mustache.js for the tmplat browser extension.
Install using npm
:
$ npm install --save tmplat-mustache
tmplat-mustache is very similar to mustache.js with the following differences:
- Uses
{unescaped}
instead of{{{unescaped}}}
- Comments, partials, sections (incl. inverted), and custom delimiters now use single curly braces
{&name}
is used to escape instead of unescape- Ignores case when looking up view properties
- Arrays are rendered as a comma-separated list based on their contents
- Objects are rendered as a comma-separated list based on their property values
- On a more technical note; the rendering is entirely asynchronous to support promises in the template context
It is also tested against its own interpretation of the official spec.
These changes make it perfect for usage within the tmplat browser extension.
The command line tool is identical except for the command name: tmplat-mustache
.
If you have any problems with this fork or would like to see changes currently in development you can do so here. Upstream features and issues are maintained separately here.
See LICENSE.md for more information on our MIT license.