import store from '../store'
var storage = {
    set(key, value) {
        if (key == 'testBox') {
            store.commit('setTestBox', value)
        }
        localStorage.setItem(key, JSON.stringify(value));
    },
    get(key) {
        return JSON.parse(localStorage.getItem(key));
    },
    remove(key) {
        if (key == 'testBox') {
            store.commit('removeTestBox')
        }
        localStorage.removeItem(key);
    }
}
export default storage;