Skip to content

Instantly share code, notes, and snippets.

View aklinkert's full-sized avatar

Alex Klinkert aklinkert

  • Hamburg
View GitHub Profile
@aklinkert
aklinkert / log_all_socket_events.js
Last active January 14, 2019 19:42
Log all Sockets Events of an socket.io client
// pre 1.0
(function() {
var emit = socket.emit;
socket.emit = function() {
console.log('***','emit', Array.prototype.slice.call(arguments));
emit.apply(socket, arguments);
};
var $emit = socket.$emit;
socket.$emit = function() {
console.log('***','on',Array.prototype.slice.call(arguments));