src/install.js   A
last analyzed

Complexity

Total Complexity 3
Complexity/F 3

Size

Lines of Code 16
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Test Coverage

Coverage 25%

Importance

Changes 3
Bugs 0 Features 0
Metric Value
cc 0
nc 1
dl 0
loc 16
ccs 2
cts 8
cp 0.25
crap 0
rs 10
c 3
b 0
f 0
wmc 3
mnd 2
bc 3
fnc 1
bpm 3
cpm 3
noi 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A install.js ➔ install 0 12 3
1
import components from './components';
2
import store from './store/store';
3
import Vuex from 'Vuex';
4
5 16
export function install(Vue, options = {}) {
6
	for (var key in components) {
7 4
		if (components.hasOwnProperty(key)) {
8
			Vue.component(key, components[key]);
9
		}
10
	}
11
12
	let commentsStore = new Vuex.Store(store);
13
	commentsStore.commit('setConfig', options);
14
15
	Vue.prototype.$commentsStore = commentsStore;
16
}
17