From c9b202f817643d777407c86da408da703afc163d Mon Sep 17 00:00:00 2001 From: Ajido Date: Wed, 25 Apr 2018 23:46:54 +0900 Subject: [PATCH] doc: add emitter.off() to events.md PR-URL: https://github.com/nodejs/node/pull/20291 Refs: https://github.com/nodejs/node/pull/17156 Reviewed-By: Colin Ihrig Reviewed-By: Tiancheng "Timothy" Gu Reviewed-By: Vse Mozhet Byt Reviewed-By: Anna Henningsen --- doc/api/events.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/doc/api/events.md b/doc/api/events.md index a5a45ca3de4834..35ad9eaed393b9 100644 --- a/doc/api/events.md +++ b/doc/api/events.md @@ -372,6 +372,17 @@ console.log(util.inspect(server.listeners('connection'))); // Prints: [ [Function] ] ``` +### emitter.off(eventName, listener) + + +* `eventName` {string|symbol} +* `listener` {Function} +* Returns: {EventEmitter} + +Alias for [`emitter.removeListener()`][]. + ### emitter.on(eventName, listener)