mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-15 04:10:40 -07:00
854 B
854 B
title
| title |
|---|
| Operators |
LiquidJS operators are very simple and different. There're 2 types of operators supported:
- Comparison operators:
==,!=,>,<,>=,<= - Logic operators:
or,and,contains
Thus numerical operators are not supported and you cannot even plus two numbers like this {% raw %}{{a + b}}{% endraw %}, instead we need a filter {% raw %}{{ a | plus: b}}{% endraw %}. Actually + is a valid variable name in LiquidJS.
Precedence
- Comparison operators. All comparison operations have the same precedence and higher than logic operators.
- Logic operators. All logic operators have the same precedence.
Associativity
Logic operators are evaluated from right to left, see shopify docs.