We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a168b81 commit aab49deCopy full SHA for aab49de
client/socket.js
@@ -5,7 +5,7 @@ const SockJS = require('sockjs-client/dist/sockjs');
5
let retries = 0;
6
let sock = null;
7
8
-function socket(url, handlers) {
+const socket = function initSocket(url, handlers) {
9
sock = new SockJS(url);
10
11
sock.onopen = function onopen() {
@@ -37,6 +37,6 @@ function socket(url, handlers) {
37
const msg = JSON.parse(e.data);
38
if (handlers[msg.type]) { handlers[msg.type](msg.data); }
39
};
40
-}
+};
41
42
module.exports = socket;
0 commit comments