eq
Eq returns true if the value equals the given parameter.
Eq returns true if the value equals the given parameter. Numbers compare numerically across int/float types, strings compare verbatim, and other types fall back to direct equality.
Input
any
Parameters
| # | Type | Required |
|---|---|---|
| 0 | any | yes |
Returns
bool
Examples
Compare a status string
Input
status = "active"Template
{{ status | eq:'active' }}Output
trueCheck for an empty inbox
Input
unread = 0Template
{{ unread | eq:0 }}Output
trueCheck a feature flag
Input
newsletter = trueTemplate
{{ newsletter | eq:true }}Output
trueHow is this guide?