Skip to content

Instantly share code, notes, and snippets.

@julianwinkel
julianwinkel / gist:4c90840ad1663dc82fea89a0e9effe53
Last active September 29, 2017 20:42
super simple localStorage wapper. Store variables with types
// https://stackoverflow.com/a/13442834
var myLocalStorage = {
set: function (item, value) {
localStorage.setItem( item, JSON.stringify(value) );
},
get: function (item) {
return JSON.parse( localStorage.getItem(item) );
}
};