How to use eventemitter2

Comprehensive eventemitter2 code examples:

How to use eventemitter2.EventEmitter:

138
139
140
141
142
143
144
145
146
147
148
149
  // have been set
  //
  bootstrap(this);
});


// Inherit from events.EventEmitter
util.inherits(Monitor, events.EventEmitter2);


//
// ### function start ([restart])

How to use eventemitter2.EventEmitter2:

15
16
17
18
19
20
21
22
23
24
25
 */


/**
 * The event emitter to broadcast localization events
 */
const emitter = new _eventemitter.EventEmitter2({
  maxListeners: 100,
  newListener: false
});
/**

How to use eventemitter2.prototype:

1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801


  // Add the goal
  this.actionClient.goals[this.goalID] = this;
}


Goal.prototype.__proto__ = EventEmitter2.prototype;


/**
 * Send the goal to the action server.
 *