Open happilymarrieddad opened 6 years ago
Here are the original funcs for quick reference.
SCSocket.prototype.emit = function (event, data, callback) {
if (this._localEvents[event] == null) {
this._emit(event, data, callback);
} else {
Emitter.prototype.emit.call(this, event, data);
}
};
SCSocket.prototype.publish = function (channelName, data, callback) {
var pubData = {
channel: this._decorateChannelName(channelName),
data: data
};
this.emit('#publish', pubData, callback);
};
I can always do this in a class or something but then I need to pass all the funcs/props to the class.. I don't like doing that.
@jondubois Hey man, if I do this would it cause any issues? I've tested it locally and it works fine. Basically, I'm trying to wrap promises around emit and publish for the client.
Thanks!