export function cachePage(e) { let page = {} if (JSON.parse(localStorage.getItem(e))) { page = JSON.parse(localStorage.getItem(e)) page.sum += 1 localStorage.setItem(e, JSON.stringify(page)) } else { page.name = e page.sum = 1 localStorage.setItem(e, JSON.stringify(page)) } }