text: 'use strict';
  
  exports.__esModule = true;
  exports.getHostForRN = getHostForRN;
  /*
   * Get React Native server IP if hostname is `localhost`
   * On Android emulator, the IP of host is `10.0.2.2` (Genymotion: 10.0.3.2)
   */
  function getHostForRN(hostname) {
    var _ref = typeof window !== 'undefined' && window.__fbBatchedBridgeConfig || {};
  
    var remoteModuleConfig = _ref.remoteModuleConfig;
  
    if (hostname !== 'localhost' && hostname !== '127.0.0.1' || !Array.isArray(remoteModuleConfig)) return hostname;
  
    var _ref2 = remoteModuleConfig.find(function (config) {
      return config && config[0] === 'AndroidConstants';
    }) || [];
  
    var AndroidConstants = _ref2[1];
  
    if (AndroidConstants) {
      var _AndroidConstants$Ser = AndroidConstants.ServerHost;
      var ServerHost = _AndroidConstants$Ser === undefined ? hostname : _AndroidConstants$Ser;
  
      return ServerHost.split(':')[0];
    }
    return hostname;
  }