For the complete documentation index, see llms.txt. This page is also available as Markdown.

Comparison Operators

eq

{{$eq value1 value2}}

Evaluates to true if value1 is equal to value2.

Arguments

Name
Description
Type
Required

value1

A static value or a variable path

StringNumberBoolean

value2

A static value or a variable path

StringNumberBoolean

Returns

(Boolean)

Example

{{#if ($eq category "sports") }}Category is sports{{/if}}

ne

{{$ne value1 value2}}

Evaluates to true if value1 is not equal to value2.

Arguments

Name
Description
Type
Required

value1

A static value or a variable path

StringNumberBoolean

value2

A static value or a variable path

StringNumberBoolean

Returns

(Boolean)

Example

{{#if ($ne category "sports") }}Category is not sports{{/if}}

gt

{{$gt number1 number2}}

Evaluates to true if number1 is greater than the number2.

Arguments

Name
Description
Type
Required

number1

A static value or a variable path

Number

number2

A static value or a variable path

Number

Returns

(Boolean)

Example

{{#if ($gt grand_total 1500) }}Grand total is greater than 1500{{/if}}

lt

{{$lt number1 number2}}

Evaluates to true if number1 is less than number2.

Arguments

Name
Description
Type
Required

number1

A static value or a variable path

Number

number2

A static value or a variable path

Number

Returns

(Boolean)

Example

{{#if ($lt score 50) }}Score is less than 50{{/if}}

gte

{{$gte number1 number2}}

Evaluates to true if number1 is greater than or equal to number2.

Arguments

Name
Description
Type
Required

number1

A static value or a variable path

Number

number2

A static value or a variable path

Number

Returns

(Boolean)

Example

{{#if ($gte score 50) }}Score is greater than or equal to 50{{/if}}

lte

{{$lte number1 number2}}

Evaluates to true if number1 is less than or equal to number2.

Arguments

Name
Description
Type
Required

number1

A static value or a variable path

Number

number2

A static value or a variable path

Number

Returns

(Boolean)

Example

{{#if ($lte score 50) }}Score is less than or equal to 50{{/if}}

Last updated

Was this helpful?