Total Complexity | 3 |
Complexity/F | 3 |
Lines of Code | 16 |
Function Count | 1 |
Duplicated Lines | 0 |
Ratio | 0 % |
Coverage | 25% |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
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 |