svelte-persisted-store
svelte-persisted-store copied to clipboard
feat: IndexedDB support
Implement IndexedDB support, useful for storing larger amounts of data.
- The persisted function is now deprecated, but remains functional
- Instead of a storage option, there are now three seperate functions;
localState,sessionStateandindexedDBState - The
localStateandsessionStatefunctions remain the same, aside from the storage parameter indexedDBStateis asynchronous and uses async/await (or callback)- Some refactoring was done, specifically with types
PS: persisted remains functional with the same API
@intercepted16 thanks for the udpated PR, but please, don't continue unless @joshnuss says so. I just expressed my opinion in the form of a PR review. That's it. It is unclear to me if @joshnuss is even agreeable to adding this feature.
@webJose Your changes were small, so I figured implementing them wouldn't hurt.
@joshnuss Are you willing to add this feature? It's been a while with no response.
Hi, I do t have a good answer right now.
The next priority for the project is adding support for runes, so I'm not sure we should add more features right now.
Is this an important requirement you're waiting on?
@joshnuss Yes, I'd prefer to use the library for this; currently I'm using a custom solution. Maybe, as breaking changes are being implemented anyway, you could include this pull request in the runes change?
I second (third) this PR/feature!
@joshnuss Still nothing?
Sorry, can you clarify what the question is?
@joshnuss are you going to add it? Been 9 months since made, and you've updated it to svelte 5.
The repo still needs to be updated to Svelte Runes.
Once that happens we can consider whether to add new storage adapters.
But I cannot promise anything, the API for indexed db and local/session storage are quite different and it might not make sense to fit them in the same API, research will have to be done, so no promises.
@joshnuss Has it been updated to Svelte Runes. this PR is almost a year old now!
It hasn't been updated yet.
This project is updated on my free time, and is not sponsored work. So please refrain from placing pressure on me.
@joshnuss My bad, not trying to put pressure.