mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-01 00:08:27 +01:00
50b56fd7a1
There is an example in eventRepositorySpec on how to listen on events.
18 lines
357 B
JavaScript
18 lines
357 B
JavaScript
var util = require('util');
|
|
var EventEmitter = require('events').EventEmitter;
|
|
var events = require('./events');
|
|
|
|
function EventRepository() {
|
|
EventEmitter.call(this);
|
|
}
|
|
|
|
util.inherits(EventRepository, EventEmitter);
|
|
|
|
EventRepository.prototype.create = function (obj) {
|
|
this.emit(events.featureCreated, obj);
|
|
};
|
|
|
|
|
|
|
|
module.exports = EventRepository;
|