Docs
OverviewTemplate SyntaxQuick Guide

Resources

Source code

Modifiers

Text
Casing
lowerslugtitletitle_modelupper
Edit
concatreplacereplace_patternreverseshortenwrap
Split & join
joinlinessplit
Trim
trimtrim_prefixtrim_suffix
Escape
escape_htmlescape_jsescape_url
Format
currencydecimalformatlengthline_numbers
Collections
Access
findfirstkeylastpluck
Query
filterhasis
Transform
flattenmapmergesortsum
Files & paths
File
file
Path
dirnameextext_dotext_prependext_trimfilename
Convert
Parse
from_csvfrom_jsonfrom_yaml
Serialize
jsonmarkdownyaml
Logic
Compare
eqgtgtenot
Default
default
Render
Template
template
Docs/Sintax/Logic/Compare

Compare

Compare values for use in conditional expressions.

Compare

eqReports numeric equality across the int and float kinds, so 5 equals 5.0.{{ total | eq:5.0 }}gtReports whether the first value exceeds the second, comparing both as numbers so 5 and 5.0 rank the same.{{ score | gt:70 }}gteReports whether the first value is greater than or equal to the second, comparing both as numbers so 5 and 5.0 rank the same.{{ score | gte:70 }}notInverts the truthiness of the value, following the same rules as a template if: booleans by their value, numbers true when greater than zero, strings true when non-empty (except the literal "false"), and collections true when non-empty.{{ name | not }}
Edit or read the source on GitHub
PreviousLogicNext eq

Built with in Vilnius, Lithuania Say hello!

ProductsOpen sourceDocs GitHub