packages/optimizely-sdk/lib/core/project_config/index.js
function(projectConfig, experimentId, logger) {
    if (projectConfig.experimentIdMap.hasOwnProperty(experimentId)) {
      var experiment = projectConfig.experimentIdMap[experimentId];
      if (!!experiment) {
        return experiment;
      }
    }

    logger.log(LOG_LEVEL.ERROR, sprintf(ERROR_MESSAGES.INVALID_EXPERIMENT_ID, MODULE_NAME, experimentId));
    return null;
  }
function(projectConfig, experimentId, logger) {
    if (projectConfig.experimentIdMap.hasOwnProperty(experimentId)) {
      var experiment = projectConfig.experimentIdMap[experimentId];
      if (!!experiment) {
        return experiment;
      }
    }

    logger.log(LOG_LEVEL.ERROR, sprintf(ERROR_MESSAGES.INVALID_EXPERIMENT_ID, MODULE_NAME, experimentId));
    return null;
  }
function ( projectConfig , experimentId , logger ) { if ( projectConfig . experimentIdMap . hasOwnProperty ( experimentId ) ) { var experiment = projectConfig . experimentIdMap [ experimentId ] ; if ( ! ! experiment ) { return experiment ; } } logger . log ( LOG_LEVEL . ERROR , sprintf ( ERROR_MESSAGES . INVALID_EXPERIMENT_ID , MODULE_NAME , experimentId ) ) ; return null ; }
Get experiment from provided experiment id. Log an error if no experiment
exists in the project config with the given ID.
@param  {Object} projectConfig  Object representing project configuration
@param  {string} experimentId  ID of desired experiment object
@return {Object} Experiment object
Get experiment from provided experiment id . Log an error if no experiment exists in the project config with the given ID .