text: // allows asynchronous execution flow.
  const init = require('./bootstrap');
  
  /**
  Global object used to create an instance of {@link ChatEngine}.
  
  @alias ChatEngineCore
  @param pnConfig {Object} ChatEngine is based off PubNub. Supply your PubNub configuration parameters here. See the getting started tutorial and [the PubNub docs](https://www.pubnub.com/docs/java-se-java/api-reference-configuration).
  @param ceConfig {Object} A list of chat engine specific config options.
  @param [ceConfig.globalChannel=chat-engine] {String} The root channel. See {@link ChatEngine.global}
  @param [ceConfig.throwErrors=true] {Boolean} Throws errors in JS console.
  @param [ceConfig.endpoint] {String} The root URL used to manage permissions for private channels.
  @return {ChatEngine} Returns an instance of {@link ChatEngine}
  @example
  ChatEngine = ChatEngineCore.create({
      publishKey: 'demo',
      subscribeKey: 'demo'
  }, {
      endpoint: 'http://localhost/auth',
      globalChannel: 'chat-engine-global-channel'
  });
  */
  const create = (pnConfig, ceConfig = {}) => {
  
      if (ceConfig.globalChannel) {
          ceConfig.globalChannel = ceConfig.globalChannel.toString();
      } else {
          ceConfig.globalChannel = 'chat-engine';
      }
  
      if (typeof ceConfig.throwErrors === 'undefined') {
          ceConfig.throwErrors = true;
      }
  
      // return an instance of ChatEngine
      return init(ceConfig, pnConfig);
  
  };
  
  // export the ChatEngine api
  module.exports = {
      plugin: {}, // leave a spot for plugins to exist
      create
  };
  