operate static method

Object operate(
  1. CalculationOperator operator,
  2. Object left,
  3. Object right
)

Creates and simplifies a CalculationOperation with the given operator, left, and right.

This automatically simplifies the operation, so it may return a SassNumber rather than a CalculationOperation.

Each of left and right must be either a SassNumber, a SassCalculation, an unquoted SassString, or a CalculationOperation.

Implementation

static Object operate(
        CalculationOperator operator, Object left, Object right) =>
    operateInternal(operator, left, right,
        inLegacySassFunction: false, simplify: true);