1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-01 00:08:27 +01:00
unleash.unleash/unleash-server/lib/eventRepository.js
svelovla 50b56fd7a1 #18 eventRepository can now emit events
There is an example in eventRepositorySpec on how to listen on events.
2014-10-22 15:35:43 +02:00

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;