Handlebar Helper Function: Equals

Compares two values for equality. It can perform different types of comparisons based on an optional third parameter.

ParameterTypeDescription
value1anyThe first value to compare.
value2anyThe second value to compare.
compareAsstringThe type of comparison to perform. Possible values: date, datetime, number, string. The default value is string.

The function returns true if the values are equal based on the specified comparison type, and false otherwise. If both values are null, it returns true. If no parameters are provided, it returns true. If one parameter is missing, it returns false. If you don’t specify a comparison type, the function performs a string comparison.