🚀 DAY 5 OF LAUNCH WEEK:Introducing Webhook Events for Alert Changes.Learn more →
Socket
Book a DemoInstallSign in
Socket

flatstache

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flatstache

Simple string template expansion using curly Mustache braces

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

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 &quot;&lt;3&quot; 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.

Keywords

string

FAQs

Package last updated on 28 Mar 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts