Based on How do I accomplish an if/else in mustache.js? and calling function with arguments in mustache javascript, I know I can create conditionals in mustache.js templates and also invoke functions to print something on my rendered HTML.
But can they both be combined ? That is, can we "if" the result of a function ?
In pseudo-code:
If someFunction(args){
// print something
}
With mustache.js notation:
{{#someFunction}}someValue{{/someFunction}}
This would output the result of the evaluation of someFunction. Can we print only if the function's evaluation is positive ?
I know about the "logic-less templating", but a developer's gotta do what a developer's gotta do.