packages/optimizely-sdk/lib/core/condition_tree_evaluator/index.js
function andEvaluator(conditions, leafEvaluator) {
  var sawNullResult = false;
  for (var i = 0; i < conditions.length; i++) {
    var conditionResult = evaluate(conditions[i], leafEvaluator);
    if (conditionResult === false) {
      return false;
    }
    if (conditionResult === null) {
      sawNullResult = true;
    }
  }
  return sawNullResult ? null : true;
}
function andEvaluator(conditions, leafEvaluator) {
  var sawNullResult = false;
  for (var i = 0; i < conditions.length; i++) {
    var conditionResult = evaluate(conditions[i], leafEvaluator);
    if (conditionResult === false) {
      return false;
    }
    if (conditionResult === null) {
      sawNullResult = true;
    }
  }
  return sawNullResult ? null : true;
}
function andEvaluator ( conditions , leafEvaluator ) { var sawNullResult = false ; for ( var i = 0 ; i < conditions . length ; i ++ ) { var conditionResult = evaluate ( conditions [ i ] , leafEvaluator ) ; if ( conditionResult === false ) { return false ; } if ( conditionResult === null ) { sawNullResult = true ; } } return sawNullResult ? null : true ; }
Evaluates an array of conditions as if the evaluator had been applied
to each entry and the results AND-ed together.
@param  {Array}      conditions      Array of conditions ex: [operand_1, operand_2]
@param  {Function}   leafEvaluator   Function which will be called to evaluate leaf condition values
@return {?Boolean}                   Result of evaluating the conditions. A return value of null
indicates that the conditions are invalid or unable to be
evaluated.
Evaluates an array of conditions as if the evaluator had been applied to each entry and the results AND - ed together .