lib/index.js   A
last analyzed

Complexity

Total Complexity 2
Complexity/F 2

Size

Lines of Code 15
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 15
rs 10
c 0
b 0
f 0
wmc 2
mnd 1
bc 1
fnc 1
bpm 1
cpm 2
noi 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A index.js ➔ start 0 9 2
1
const master = require('./master')
2
const worker = require('./worker')
3
const defaultConfig = require('../config')
4
5
async function start ({ config, plugins }) {
6
  const setup = Object.assign({}, defaultConfig, config || {})
7
8
  if (setup.isMaster && setup.totalWorkers > 0) {
9
    master(setup)
10
  } else {
11
    await worker(setup, plugins)
12
  }
13
}
14
15
module.exports = start
16