{"size": 496, "ext": "js", "max_stars_repo_path": "src/store/getters.js", "max_stars_repo_name": "liguojungithub/demo", "max_stars_repo_stars_event_min_datetime": "2020-06-08T04:28:52.000Z", "max_stars_repo_stars_event_max_datetime": "2020-12-21T01:39:13.000Z", "max_issues_repo_path": "src/store/getters.js", "max_issues_repo_name": "cjyd-tub/mall", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/store/getters.js", "max_forks_repo_name": "cjyd-tub/mall", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 4, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 22.5454545455, "max_line_length": 64, "alphanum_fraction": 0.6552419355}
const getters = {
  // base info
  id: state => state.user.id,
  name: state => state.user.name,
  userInfo: state => state.user.userInfo,

  // address
  addressList: state => state.address.addressList,
  selectedAddress: state => state.address.selectedAddress,

  // search
  searchKey: state => {
    if (state.search.searchKey.length <= 0) {
      return JSON.parse(localStorage.getItem('searchKey')) || []
    } else {
      return state.search.searchKey
    }
  }
}

export default getters
