wolfendale / scala-nunjucks

5 stars 1 forks source link

Conditionally call filters #20

Closed wolfendale closed 4 years ago

wolfendale commented 4 years ago

Filters should be able to be applied conditionally with a fallback:

{{ 'foo' | capitalize if x else 'bar' }}

Run with { x: true } would return "FOO" Run with { x: false } would return "bar"