EventEmitter.prototype.once should "return this;"
authorDaniel C <333222@gmail.com>
Tue, 7 Dec 2010 16:44:21 +0000 (18:44 +0200)
committerRyan Dahl <ry@tinyclouds.org>
Fri, 31 Dec 2010 02:58:43 +0000 (18:58 -0800)
lib/events.js

index 26e0f061933980d01cbed927de4262578f2e168b..ad3ce726c74628a1d085b1da438b09d71443439f 100644 (file)
@@ -89,6 +89,8 @@ EventEmitter.prototype.once = function(type, listener) {
     self.removeListener(type, g);
     listener.apply(this, arguments);
   });
+
+  return this;
 };
 
 EventEmitter.prototype.removeListener = function(type, listener) {