packages/optimizely-sdk/lib/core/project_config/index.js
function(projectConfig, experimentKey) {
    var experiment = projectConfig.experimentKeyMap[experimentKey];
    if (fns.isEmpty(experiment)) {
      throw new Error(sprintf(ERROR_MESSAGES.INVALID_EXPERIMENT_KEY, MODULE_NAME, experimentKey));
    }

    return experiment.audienceConditions || experiment.audienceIds;
  }
function(projectConfig, experimentKey) {
    var experiment = projectConfig.experimentKeyMap[experimentKey];
    if (fns.isEmpty(experiment)) {
      throw new Error(sprintf(ERROR_MESSAGES.INVALID_EXPERIMENT_KEY, MODULE_NAME, experimentKey));
    }

    return experiment.audienceConditions || experiment.audienceIds;
  }
function ( projectConfig , experimentKey ) { var experiment = projectConfig . experimentKeyMap [ experimentKey ] ; if ( fns . isEmpty ( experiment ) ) { throw new Error ( sprintf ( ERROR_MESSAGES . INVALID_EXPERIMENT_KEY , MODULE_NAME , experimentKey ) ) ; } return experiment . audienceConditions || experiment . audienceIds ; }
Get audience conditions for the experiment
@param  {Object}         projectConfig Object representing project configuration
@param  {string}         experimentKey Experiment key for which audience conditions are to be determined
@return {Array}          Audience conditions for the experiment - can be an array of audience IDs, or a
nested array of conditions
Examples: ["5", "6"], ["and", ["or", "1", "2"], "3"]
@throws If experiment key is not in datafile
Get audience conditions for the experiment