Provides logical operator functions for combining multiple boolean expressions and returning a single boolean value. These operators are available for use in HotMesh mapping rules.

Invoked in mapping rules using {@logical.<method>} syntax.

Constructors

Methods

Constructors

Methods

  • Returns true if both boolean expressions evaluate to true. Performs a logical AND operation.

    Parameters

    • firstValue: boolean

      The first boolean expression

    • secondValue: boolean

      The second boolean expression

    Returns boolean

    true if both values are truthy, false otherwise

    is_active_and_paid:
    "@pipe":
    - ["{a.user.isActive}", "{a.user.hasPaid}"]
    - ["{@logical.and}"]
  • Returns true if at least one of the boolean expressions evaluates to true. Performs a logical OR operation.

    Parameters

    • firstValue: boolean

      The first boolean expression

    • secondValue: boolean

      The second boolean expression

    Returns boolean

    true if either value is truthy, false otherwise

    has_trial_or_subscription:
    "@pipe":
    - ["{b.user.hasTrial}", "{b.user.hasSubscription}"]
    - ["{@logical.or}"]