GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 1b573f...d56bf7 )
by Vladimir
30s
created

src/front/js/sockets/index.js   A

Complexity

Total Complexity 4
Complexity/F 2

Size

Lines of Code 33
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 0
wmc 4
c 1
b 0
f 0
nc 1
mnd 1
bc 4
fnc 2
dl 0
loc 33
rs 10
bpm 2
cpm 2
noi 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A index.js ➔ ??? 0 3 1
1
const io = require('socket.io-client');
2
3
const app = require('./../app');
4
const renderJson = require('./../lib');
5
6
const socket = io.connect();
7
8
/**
9
 * Handler for WebSocket 'connect' event.
10
 * Emits 'join' event which is intended to join WebSocket room for current streamId.
11
 */
12
socket.on('connect', () => {
13
  socket.emit('join', app.getStreamId());
14
});
15
16
/**
17
 * Handler for new data.
18
 * Renders data on web page (add to the bottom).
19
 *
20
 * @event LOG.NEW
21
 */
22
socket.on('log', (data) => {
23
  // It is only way to render proper data because socket.io rooms disabled here
24
  // @see https://github.com/cn007b/log/blob/master/src/routes/index.js#L49
25
  if (data.streamId !== app.getStreamId()) {
26
    return;
27
  }
28
29
  if (data.format === 'json') {
30
    /** global: app */
31
    renderJson(data, app.getAutoScroll());
32
  }
33
});
34