Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
data = undefined;
} else {
try {
data = JSON.parse(data);
} catch (e) { /* then data is what it is */ }
}
console.log('redis subscriber', event, data);
self.emit(event, data);
});
}
/**
* Monkey patch Socket.IO Store to use EventEmitter2 instead of events.EventEmitter
*/
Store.prototype.__proto__ = EventEmitter2.prototype;
/**
* Inherits from Socket.IO Store
*/
util.inherits(RedisStore, Store);
/**
* Namespaced keys.
*
* @param {String} key
*
* @api private
*/
}
once(event, callback) {
return this._handle('once', event, callback)
}
static mixin(target) {
Object.defineProperties(target, properties)
}
}
const {
constructor, // Don't extract constructor, but everything else
...properties
} = {
...Object.getOwnPropertyDescriptors(EventEmitter2.prototype),
...Object.getOwnPropertyDescriptors(EventEmitter.prototype)
}
'use strict';
// Libs
var EventEmitter = require('eventemitter2');
function InspireEvents() {};
InspireEvents.prototype = Object.create(EventEmitter.prototype);
module.exports = InspireEvents;