simpleStorage
simpleStorage copied to clipboard
Possible to store data outside the simpleStorage object?
jStorage is great, and I think simpleStorage is great for a more minimal footprint. The concern I have with both scripts is the dependency that would result from using either. The key/value data is stored within the jStorage/simpleStorage object. This makes it difficult to transition from or to simpleStorage when visitors have pre-existing localStorage data already set in the browser.
Using localStorage directly, or other storage wrappers, the key/value data is stored at the root/top-level by default. I understand your rationale for doing it differently (such as supporting TTL), but would you consider modifying it so that the key/value data is stored at the root/top-level instead? Or perhaps mirror the data to break the dependency, or track TTL separately? Or whatever else would work to allow folks to seamlessly transition to using simpleStorage?
Thanks.