effect icon indicating copy to clipboard operation
effect copied to clipboard

Add indexedDbKeyValueStore to @effect/platform-browser

Open mattiamanzati opened this issue 9 months ago • 3 comments

What is the problem this feature would solve?

Right now the platform-browser packages exposes session storage and local storage. Unfortunately those seems not to be an option while running inside a webworker or a sharedworker.

What is the feature you are proposing to solve the problem?

We could support indexeddb which is available both in a UI tab, and in a webworker context.

What alternatives have you considered?

No response

mattiamanzati avatar Apr 28 '24 15:04 mattiamanzati

I have an implementation of this here if you're interested https://github.com/jessekelly881/effect-idb. I could probably create a PR to add this to the /platform package.

jessekelly881 avatar Apr 29 '24 14:04 jessekelly881

Would be super useful. Maybe @myobie could take a look at the eventual PR as well, as he knows all the nuances and pitfalls related to IDB so we make sure to not wrap it in a leaky way.

schickling avatar Apr 30 '24 13:04 schickling

+1 would be helpful. My wrapper is basically just duct tape and hope lol.

jessekelly881 avatar Apr 30 '24 14:04 jessekelly881