src/vue/store/store.js   A
last analyzed

Complexity

Total Complexity 2
Complexity/F 1

Size

Lines of Code 20
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 12
c 0
b 0
f 0
dl 0
loc 20
rs 10
mnd 0
bc 0
fnc 2
bpm 0
cpm 1
noi 0
1
import Vue from 'vue'
2
import Vuex from 'vuex'
3
4
Vue.use(Vuex);
5
6
export const store = new Vuex.Store({
7
    state: {
8
        locale: null
9
    },
10
    mutations:{
11
        setLocale(state, locale){
12
            state.locale = locale
13
        }
14
    },
15
    getters: {
16
        locale: state => {
17
            return state.locale
18
        }
19
    }
20
});
21
22