hogan.js: Mustache compiler from Twitter

Hogan is a console compiler for Mustache templates, complete with a fantastic name and man page. Aiming not only for speed, Hogan boasts a parser API:

var text = "{{^check}}{{i18n}}No{{/i18n}}{{/check}}";
text +=  "{{#check}}{{i18n}}Yes{{/i18n}}{{/check}}";
var tree = Hogan.parse(Hogan.scan(text));

// outputs "# check"
console.log(tree[0].tag + " " + tree[0].name);

// outputs "Yes"

Just released on the hub, check the web site for usage.

News Films

Our little film studio focuses on telling developer-centric stories that need to be seen.

GopherCon 2016 Conference Recap

0:00 / 0:00