Closed andersevenrud closed 2 years ago
Opsie. Just realized I stashed the save
method changes because I was switching branches. Applied :blush:
Is this and #159 still in need of any assistance? I've made some modifications to my fork of the localStorage adapter so I feel pretty comfortable with it if you need me to look at/add anything. About to go on vacation but if so I will check back when I return home.
I can't remember working on this... but since it's still open I assume that it's not finished, so any help is appreciated @ajmeese7 .
I just tried this out in my implementation of the library and it seems to work exactly as intended. I added some additional documentation to my localstorage.js
file if you are interested in that, but other than that I'm not sure what there is left to implement for this feature. The tests pass as well.
The only thing that has not been solved is some kind of migration support so that settings are not lost with an update.
But not really sure that's really needed. Maybe just a notice in the release notes will do.
I agree, if the user requires that the old localStorage
items be respected, they can simply make the prefix empty or remove it entirely so things will continue to work as they are now. This is more of an edge case feature anyways that I don't see the average user struggling with much.
The release notes mention should be a perfect solution to this.
Avoid parsing of localStorage entries that does not contains a configured prefix because it could contain data that has been set in other applications under the same host.