store.js 246 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 export function getStore (name) { try { return JSON.parse(window.localStorage.getItem(name)) } catch (e) {} } export function setStore (name, data) { try { window.localStorage.setItem(name, JSON.stringify(data)) } catch (e) {} }