Mustache.js

Mustache.js is an implementation of the popular Mustache template system for JavaScript templating. Mustache touts itself as a logic-less template syntax. The idea behind this concept is not necessarily to have templates completely void of logic, but more to discourage the practice of including a large amount of business logic within your templates.

Mustache gets its name from the use of double curly braces, which resemble the shape of a mustache, as the default delimiter tags for templates. The major difference between Mustache templates and Underscore.js templates is that Mustache does not allow for the placement of arbitrary JavaScript within an alternate form of its tags; it only allows for expressions.

In its simplest form, a Mustache ...

Get Mastering JavaScript Single Page Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.