Skip to content

Commit 5a79a0e

Browse files
committed
Added 'removeListener', 'removeAllListeners' & 'setMaxListeners'
1 parent 356c74c commit 5a79a0e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lib/meetup.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,12 @@ class APIRequest {
278278
}
279279
return this;
280280
};
281+
282+
// listeners functions
283+
['removeListener', 'removeAllListeners', 'setMaxListeners'].forEach(fnct => {
284+
this[fnct] = req[fnct];
285+
return this;
286+
});
281287
}
282288

283289
// WebSocket request
@@ -316,6 +322,12 @@ class APIRequest {
316322
}
317323
return this;
318324
};
325+
326+
// listeners functions
327+
['removeListener', 'removeAllListeners', 'setMaxListeners'].forEach(fnct => {
328+
this[fnct] = ws[fnct];
329+
return this;
330+
});
319331
}
320332
}
321333

0 commit comments

Comments
 (0)