premasagar / tim

A tiny, secure JavaScript micro-templating script.
251 stars 26 forks source link

Bool conditional - Check against false? #19

Closed ghost closed 9 years ago

ghost commented 9 years ago

Is there anyway to show something if a bool is false? At the minute it looks like we can only check against true values.

premasagar commented 9 years ago

No, there is no way to output text if the boolean is false. A value of true indicates that a particular block should be rendered, and false that it shouldn't. The data object can usually be worked accordingly, so that instead of an if/else structure, you have if this, if that.