defineEvent( ev ) {
    let event = ev;
    /* Throw an exception if no event was supplied */
    if ( !event ) {
      throw new EventBusException( 'An event must be supplied' );
    }

    /* Check whether we were passed in an array */
    if ( !( event instanceof Array )) {
      event = [event];
    }

    /* Store a list of defined events */
    const defined = [];

    /* Loop through the passed in event names */
    event.forEach(( e ) => {
      /* Make sure we haven't already defined this event */
      if ( this.events.indexOf( e ) < 0 ) {
        this.events.push( e );
        defined.push( e );
        this.ee.defineEvent( e );
      }
    });

    /* Log that the events have been created */
    if ( defined.length ) {
      this.logger.debug( `Defined events: ${event.join( ', ' )}` );
    }
  }
/**
   * The defineEvent function defines events that will be created by components
   * of the system. You can pass in a single string representing an event name
   * or an array of strings to define multiple events at once. The passed in
   * event names are then both added to our internal list of event names and
   * added to the EventEmitter
   */
The defineEvent function defines events that will be created by components
of the system. You can pass in a single string representing an event name
or an array of strings to define multiple events at once. The passed in
event names are then both added to our internal list of event names and
added to the EventEmitter
The defineEvent function defines events that will be created by components of the system . You can pass in a single string representing an event name or an array of strings to define multiple events at once . The passed in event names are then both added to our internal list of event names and added to the EventEmitter
defineEvent( ev ) {
    let event = ev;
    if ( !event ) {
      throw new EventBusException( 'An event must be supplied' );
    }
    if ( !( event instanceof Array )) {
      event = [event];
    }
    const defined = [];
    event.forEach(( e ) => {
      if ( this.events.indexOf( e ) < 0 ) {
        this.events.push( e );
        defined.push( e );
        this.ee.defineEvent( e );
      }
    });
    if ( defined.length ) {
      this.logger.debug( `Defined events: ${event.join( ', ' )}` );
    }
  }
defineEvent ( ev ) { let event = ev ; if ( ! event ) { throw new EventBusException ( 'An event must be supplied' ) ; } if ( ! ( event instanceof Array ) ) { event = [ event ] ; } const defined = [ ] ; event . forEach ( ( e ) => { if ( this . events . indexOf ( e ) < 0 ) { this . events . push ( e ) ; defined . push ( e ) ; this . ee . defineEvent ( e ) ; } } ) ; if ( defined . length ) { this . logger . debug ( ` ${ event . join ( ', ' ) } ` ) ; } }
The defineEvent function defines events that will be created by components
 of the system.
The defineEvent function defines events that will be created by components of the system .
/* Throw an exception if no event was supplied */ /* Check whether we were passed in an array */ /* Store a list of defined events */ /* Loop through the passed in event names */ /* Make sure we haven't already defined this event */ /* Log that the events have been created */