From e105aae57bb44a257ed39dff20032f97fe7ddb8b Mon Sep 17 00:00:00 2001 From: Danilo Figueiredo Date: Thu, 19 Oct 2017 12:05:53 +0100 Subject: [PATCH] Add `off` shortcut for `removeListener` So it's consistent with `on` shortcut --- events.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/events.js b/events.js index 1619a62..ac1b30f 100644 --- a/events.js +++ b/events.js @@ -218,6 +218,8 @@ EventEmitter.prototype.removeListener = function(type, listener) { return this; }; +EventEmitter.prototype.off = EventEmitter.prototype.removeListener; + EventEmitter.prototype.removeAllListeners = function(type) { var key, listeners;