Open mbhall88 opened 7 years ago
Take all events and make a config file with them stored in an object rather than explicitly typing them as a string. This will prevent typos and also make debugging easier. E.g
module.exports = { events: { GREET: 'greet' } }; // .... var eventConfig = require('./config'); emtr.on(eventConfig.GREET, function() { console.log("Somewhere, someone said hello"); }); emtr.emit(eventConfig.GREET);
Take all events and make a config file with them stored in an object rather than explicitly typing them as a string. This will prevent typos and also make debugging easier. E.g