packages/optimizely-sdk/lib/core/project_config/index.js
function(projectConfig, experimentId) {
    var experiment = projectConfig.experimentIdMap[experimentId];
    if (fns.isEmpty(experiment)) {
      throw new Error(sprintf(ERROR_MESSAGES.INVALID_EXPERIMENT_ID, MODULE_NAME, experimentId));
    }
    return experiment.layerId;
  }
function(projectConfig, experimentId) {
    var experiment = projectConfig.experimentIdMap[experimentId];
    if (fns.isEmpty(experiment)) {
      throw new Error(sprintf(ERROR_MESSAGES.INVALID_EXPERIMENT_ID, MODULE_NAME, experimentId));
    }
    return experiment.layerId;
  }
function ( projectConfig , experimentId ) { var experiment = projectConfig . experimentIdMap [ experimentId ] ; if ( fns . isEmpty ( experiment ) ) { throw new Error ( sprintf ( ERROR_MESSAGES . INVALID_EXPERIMENT_ID , MODULE_NAME , experimentId ) ) ; } return experiment . layerId ; }
Get layer ID for the provided experiment key
@param  {Object} projectConfig Object representing project configuration
@param  {string} experimentId Experiment ID for which layer ID is to be determined
@return {string} Layer ID corresponding to the provided experiment key
@throws If experiment key is not in datafile
Get layer ID for the provided experiment key