diff --git a/lib/events.js b/lib/events.js index 7c04ce3..ab0c10d 100644 --- a/lib/events.js +++ b/lib/events.js @@ -70,14 +70,11 @@ EventEmitter.prototype.once = function(type, listener) { }; EventEmitter.prototype.listeners = function(type) { - return typeof this._events[type] === 'function' - ? [this._events[type]] - : this._events[type] || []; + return typeof this._events[type] === 'function' ? [this._events[type]] : this._events[type] || []; }; EventEmitter.prototype._emit = function(type, args) { - var handler = this._events[type] - , ret; + var handler = this._events[type], ret; // if (type !== 'event') { // this._emit('event', [type.replace(/^element /, '')].concat(args)); @@ -104,9 +101,7 @@ EventEmitter.prototype._emit = function(type, args) { }; EventEmitter.prototype.emit = function(type) { - var args = slice.call(arguments, 1) - , params = slice.call(arguments) - , el = this; + var args = slice.call(arguments, 1), params = slice.call(arguments), el = this; this._emit('event', params);