tmplat-mustache

2.5.0 • Public • Published

tmplat-mustache

A fork of mustache.js for the tmplat browser extension.

License Release

Install

Install using npm:

$ npm install --save tmplat-mustache

Usage

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.

Bugs

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.

License

See LICENSE.md for more information on our MIT license.

Package Sidebar

Install

npm i tmplat-mustache

Homepage

tmplat.com

Weekly Downloads

1

Version

2.5.0

License

MIT

Unpacked Size

57.6 kB

Total Files

8

Last publish

Collaborators

  • neocotic