var EE = require('events').EventEmitter; var ee = new EE(); ee.on('test', function (first, second, third) { console.log(first, second, third); //Will output full phrase }); ee.on('test', function (first) { console.log(first); //Will output just first word }); ee.on('test', function () { console.log.apply(console, arguments); //Will output full phrase again }); ee.emit('test', 'Hello', 'my', 'world!');
// some setup var EE = require('events').EventEmitter; var glob = require('glob'); var eventBus = new EE(); // find plugins glob("plugins/*.js", function(err, files) { if (err) { // some error handling here } files.forEach(function(file) { var plugin = require(file); plugin(eventBus); }); });
this.Emitter = new EE(); this.userID = userId; this.current = -1;
public static final EE parseBREE(String bree) { EE ee = new EE();
public static final EE parseBREE(String bree) { EE ee = new EE();