replace localStorage.foo with localStorage.get/setItem('foo')