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

    logger.log(LOG_LEVEL.ERROR, sprintf(ERROR_MESSAGES.FEATURE_NOT_IN_DATAFILE, MODULE_NAME, featureKey));
    return null;
  }
function(projectConfig, featureKey, logger) {
    if (projectConfig.featureKeyMap.hasOwnProperty(featureKey)) {
      var feature = projectConfig.featureKeyMap[featureKey];
      if (!!feature) {
        return feature;
      }
    }

    logger.log(LOG_LEVEL.ERROR, sprintf(ERROR_MESSAGES.FEATURE_NOT_IN_DATAFILE, MODULE_NAME, featureKey));
    return null;
  }
function ( projectConfig , featureKey , logger ) { if ( projectConfig . featureKeyMap . hasOwnProperty ( featureKey ) ) { var feature = projectConfig . featureKeyMap [ featureKey ] ; if ( ! ! feature ) { return feature ; } } logger . log ( LOG_LEVEL . ERROR , sprintf ( ERROR_MESSAGES . FEATURE_NOT_IN_DATAFILE , MODULE_NAME , featureKey ) ) ; return null ; }
Get feature from provided feature key. Log an error if no feature exists in
the project config with the given key.
@param {Object} projectConfig
@param {string} featureKey
@param {Object} logger
@return {Object|null} Feature object, or null if no feature with the given
key exists
Get feature from provided feature key . Log an error if no feature exists in the project config with the given key .