Skip to content

🙊 The smallest implementation of Mustache template engine. (0.4 KB)

License

Notifications You must be signed in to change notification settings

aishikaty/tiny-mustache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tiny Mustache

The smallest implementation of Mustache template engine.

Only 436 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 {{=<% %>=}}

Browser support

This library works in every modern browser. To use it in IE you will need a polyfill for Object.assign().

About

🙊 The smallest implementation of Mustache template engine. (0.4 KB)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published