Logic-less templates. mustache.js is a zero-dependency implementation of the mustache template system in JavaScript. Mustache is a logic-less template syntax. It can be used for HTML, config files, source code - anything. It works by expanding tags in a template using values provided in a hash or object. We call it "logic-less" because there are no if statements, else clauses, or for loops. Instead there are only tags. Some tags are replaced with a value, some nothing, and others a series of values. Tags are indicated by the double mustaches. {{person}} is a tag, as is {{#person}}. In both examples, we'd refer to person as the key or tag key. All variables are HTML escaped by default. If you want to return unescaped HTML, use the triple mustache: {{{name}}}. You can also use & to unescape a variable: {{& name}}. This may be useful when changing delimiters (see "Set Delimiter" below).

Features

  • Works great with TextMate, Vim, Emacs, Coda, and Atom
  • Mustache can be used for HTML, config files, and source code
  • It works by expanding tags in a template using values provided in a hash or object
  • There are no if statements, else clauses, or for loops
  • Some tags are replaced with a value, some nothing, and others a series of values
  • Available in Ruby, JavaScript, Python, Erlang, Elixir, PHP, Perl, Raku, Objective-C, and more

Project Samples

Project Activity

See All Activity >

Categories

Admin Templates

License

MIT License

Follow mustache.js

mustache.js Web Site

Other Useful Business Software
Enterprise-grade ITSM, for every business Icon
Enterprise-grade ITSM, for every business

Give your IT, operations, and business teams the ability to deliver exceptional services—without the complexity.

Freshservice is an intuitive, AI-powered platform that helps IT, operations, and business teams deliver exceptional service without the usual complexity. Automate repetitive tasks, resolve issues faster, and provide seamless support across the organization. From managing incidents and assets to driving smarter decisions, Freshservice makes it easy to stay efficient and scale with confidence.
Try it Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of mustache.js!

Additional Project Details

Operating Systems

Android

Programming Language

JavaScript

Related Categories

JavaScript Admin Templates

Registered

2021-04-07