AnalyticsEventEmitter.js
function AnalyticsEventEmitter(logger, utils, CONSTANT, onErrorCallback, optionalArguments, serviceName) {
  'use strict';

  this.logger = logger || {};
  this.utils = utils || {};
  this.CONSTANT = CONSTANT || {};

  optionalArguments = optionalArguments || {};

  this.settings = optionalArguments.settings;
  this.reportEventDelay = optionalArguments.reportEventInterval;
  
  if(serviceName) {
    this.networkRequestServiceName = serviceName;
  }

  // Register onErrorCallback callback
  this.on('error', onErrorCallback || function (err) {
    this.logger.log('Emitted an error event: ' + err);
  });
}
function AnalyticsEventEmitter(logger, utils, CONSTANT, onErrorCallback, optionalArguments, serviceName) {
  'use strict';

  this.logger = logger || {};
  this.utils = utils || {};
  this.CONSTANT = CONSTANT || {};

  optionalArguments = optionalArguments || {};

  this.settings = optionalArguments.settings;
  this.reportEventDelay = optionalArguments.reportEventInterval;
  
  if(serviceName) {
    this.networkRequestServiceName = serviceName;
  }

  // Register onErrorCallback callback
  this.on('error', onErrorCallback || function (err) {
    this.logger.log('Emitted an error event: ' + err);
  });
}
function AnalyticsEventEmitter ( logger , utils , CONSTANT , onErrorCallback , optionalArguments , serviceName ) { 'use strict' ; this . logger = logger || { } ; this . utils = utils || { } ; this . CONSTANT = CONSTANT || { } ; optionalArguments = optionalArguments || { } ; this . settings = optionalArguments . settings ; this . reportEventDelay = optionalArguments . reportEventInterval ; if ( serviceName ) { this . networkRequestServiceName = serviceName ; } // Register onErrorCallback callback this . on ( 'error' , onErrorCallback || function ( err ) { this . logger . log ( 'Emitted an error event: ' + err ) ; } ) ; }
This is the main class that gets returned by our SDK init method.  It contains several public functions intended to be consumed by users of the SDK.  Similar to AnalyticsSDK.java for our java SDK.  See README.md for detailed documentation.
This is the main class that gets returned by our SDK init method . It contains several public functions intended to be consumed by users of the SDK . Similar to AnalyticsSDK . java for our java SDK . See README . md for detailed documentation .