You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

12 lines
309 B

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))
}
}