Skip to content

Latest commit

 

History

History
25 lines (19 loc) · 571 Bytes

README.md

File metadata and controls

25 lines (19 loc) · 571 Bytes

Tiny Mustache

The smallest implementation of Mustache template engine.

Only 446 bytes gzipped.

Usage

mustache("Hello {{name}}!", {name: "world"})
// => Hello world!

Features

  • variables {{escaped}}, {{&unescaped}}, {{{unescaped}}}
  • sections {{#section}}
  • inverted sections {{^inverted}}
  • lambdas {{#lambda}}
  • comments {{!comment}}
  • partials {{>partial}}
  • variables dot notation {{obj.prop}}
  • tests

Not implemented

  • set delimiter {{=<% %>=}}