9 ms·
I wasn't aware of this. This looks like a bad design choice indeed. I hate when libraries convert stuff implicitly for you. html5's localStorage has a similar p
by lang 15y ago
I wasn't aware of this. This looks like a bad design choice indeed. I hate when libraries convert stuff implicitly for you. html5's localStorage has a similar problem. Only, it converts whatever you are trying to store into a string. Would be better if it accepted only strings and threw an error if you tried to store something else, imho.
- stefankendall 15y agoAgreed that localStorage should throw errors. This is particularly fun: localStorage['a'] = {a:1}; localStorage['a'] -> "[object Object]" Crap.