Permalink
Browse files

[api] Add `undata` method

  • Loading branch information...
1 parent f0ff6f9 commit ab9357d698bd4ec0229b2512c148e38c5ef2a615 @mmalecki mmalecki committed Feb 2, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/nssocket.js
View
@@ -166,6 +166,10 @@ NsSocket.prototype.data = function (event, callback) {
this.on(['data'].concat(event), callback);
};
+NsSocket.prototype.undata = function (event, listener) {
+ this.off(['data'].concat(event), listener);
+};
+
//
// ### function data (event, callback)
// #### @event {Array|string} Namespaced `data` event to listen to once.

0 comments on commit ab9357d

Please sign in to comment.