flatstache
v1.0.0
Published
Simple string template expansion using curly Mustache braces
Downloads
4
Maintainers
Readme
Mustache is a simple, logic-less templating language. Flatstache supports an even simpler subset of template features, just escaped or unescaped mustachios from a flat dictionary:
Flatstache.to_html("{{test}}{{{ing}}}, {{what}}{{not}}", {test:'Win', ing:'ning', what: "I dunno the \"<3\" contest maybe?"});
Outputs a string suitable for use as an element's innerHTML: "Winning, I dunno the "<3" contest maybe?"
So it's kind of like mustache.js loses to printf without the 'f' or...something. But it's small! (<1kB before minification)
Also: you can now npm install --save flatstache
for all your require('flatstache').to_html(…)
needs.