Skip to content

Add operators on values

Created by: vinber

let's use a js template language (like the famous mustache). Some of them (doT.js, mustache and handlebarsjs). Favourite : handlebarsjs, the syntax is clear and human-comprehensible, and it's easily extendable.

To write something like:

{{#if name}} Hello {{name}} {{else}} No name provided {{/if}}

The only little thing I would miss is a way to test the value of a variable; it can be resolved by defining a custom helper ?

@brunetton