{"size": 493, "ext": "js", "max_stars_repo_path": "src/utils/storage.js", "max_stars_repo_name": "ruyangit/emw-vuejs", "max_stars_repo_stars_event_min_datetime": "2019-12-13T04:01:32.000Z", "max_stars_repo_stars_event_max_datetime": "2021-12-23T02:41:22.000Z", "max_issues_repo_path": "src/utils/storage.js", "max_issues_repo_name": "ruyangit/my-vuejs-emw", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/utils/storage.js", "max_forks_repo_name": "ruyangit/my-vuejs-emw", "max_forks_repo_forks_event_min_datetime": "2017-07-14T05:41:53.000Z", "max_forks_repo_forks_event_max_datetime": "2017-08-02T01:19:11.000Z"}
{"max_stars_count": 4, "max_issues_count": null, "max_forks_count": 3, "avg_line_length": 18.2592592593, "max_line_length": 44, "alphanum_fraction": 0.6105476673}
import qs from 'qs'
/**
 * 存储localStorage
 */
export const setStore = (key, value) => {
    if (!key) return;
    if (typeof value !== 'string') {
        value = qs.stringify(value);
    }
    window.localStorage.setItem(key, value);
}

/**
 * 获取localStorage
 */
export const getStore = key => {
    if (!key) return;
    return window.localStorage.getItem(key);
}

/**
 * 删除localStorage
 */
export const removeStore = key => {
    if (!key) return;
    window.localStorage.removeItem(key);
}