Express Sweet API Reference - v3.0.0
    Preparing search index...
    • Helper to imitate the ternary '?:' conditional operator.

      Parameters

      • condition: boolean

        Satisfying condition for getting first value. Either true of false.

      • value1: any

        First value to be displayed as result..

      • value2: any

        Second value to be displayed as result. Defaults to an empty string.

      Returns any

      Returns the result of the ternary operator.

      {{ifx true val1 val2}}
      {{ifx false val1 val2}}
      {{ifx (eq val1 val2) val3 val4}}
      {{ifx (not (eq val1 val2)) val3 val4}}
      {{ifx true val}}
      {{ifx false val}}