svelte-stored-writable
svelte-stored-writable copied to clipboard
Handle schema parse errors
trafficstars
If there is an existing localStorage entry for key, the library should not throw an error, but replace the existing localStorage entry with the initialValue.
This allows users of this library to modify stores with new schemas with ease.
I'm aware that this can also be handled by users of this library with a try catch, though IMO most people would prefer to instantiate their stores as mentioned in the README, but without the possible foot gun that their deployments are gonna break.
Open for any feedback or changes.