events: fix typos in code comment
authorRyunosuke SATO <tricknotes.rs@gmail.com>
Mon, 10 Dec 2012 09:32:56 +0000 (18:32 +0900)
committerBen Noordhuis <info@bnoordhuis.nl>
Mon, 10 Dec 2012 12:08:26 +0000 (13:08 +0100)
- newListeners -> newListener

lib/events.js

index 59bcb13..979f191 100644 (file)
@@ -137,8 +137,8 @@ EventEmitter.prototype.addListener = function(type, listener) {
 
   if (!this._events) this._events = {};
 
-  // To avoid recursion in the case that type == "newListeners"! Before
-  // adding it to the listeners, first emit "newListeners".
+  // To avoid recursion in the case that type == "newListener"! Before
+  // adding it to the listeners, first emit "newListener".
   if (this._events.newListener) {
     this.emit('newListener', type, typeof listener.listener === 'function' ?
               listener.listener : listener);