unissist
Version:
A persistance library for unistore
3 lines (2 loc) • 353 B
JavaScript
module.exports=function(t){return t=t||"unistorePersist",{getState:function(){var e;try{e=JSON.parse(localStorage.getItem(t))}catch(t){}if(null!==e)return e},setState:function(e){try{localStorage.setItem(t,JSON.stringify(e))}catch(t){}},clearState:function(){try{localStorage.removeItem(t)}catch(t){}}}};
//# sourceMappingURL=localStorageAdapter.js.map