{"size": 390, "ext": "js", "max_stars_repo_path": "event_bus.js", "max_stars_repo_name": "pramitkundu92/migration_tool", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "event_bus.js", "max_issues_repo_name": "pramitkundu92/migration_tool", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "event_bus.js", "max_forks_repo_name": "pramitkundu92/migration_tool", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 21.6666666667, "max_line_length": 43, "alphanum_fraction": 0.5205128205}
const EventEmitter = require('events');

let EventBus = (function() {
    let _instance;
    return {
        init() {
            _instance = new EventEmitter();
        },
        emit(event, data) {
            _instance.emit(event, data);
        },
        registerHandler(event, callback) {
            _instance.on(event, callback);
        }
    };
})();

module.exports = EventBus;