From 4304ce8bb886fc7364c8223500ee57eac141fd43 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Fri, 21 Dec 2018 21:30:21 -0500 Subject: [PATCH] lint lib/events.js --- lib/events.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) 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);