hack-pad / go-indexeddb

An IndexedDB driver for Go code compiled to WebAssembly.
Apache License 2.0
27 stars 4 forks source link

Create more Go-like wrappers for common IndexedDb use cases #7

Open Jtaylorapps opened 1 year ago

Jtaylorapps commented 1 year ago

In my PR, I provide several examples of common IndexedDb use cases that can be converted into Go-like functions with relatively little effort or complexity. Perhaps it could be considered to create a new package that leverages the more faithful IndexedDb API into a far more usable and understandable set of functions.

Related: https://github.com/hack-pad/go-indexeddb/pull/6

JohnStarich commented 1 year ago

Thanks for opening @Jtaylorapps 👍

IndexedDB can be pretty difficult to use for sure. I definitely prefer to keep idb (the primary package) focused on API compatibility, but I also agree it should be easy to use where possible.

A new package is a good option for introducing a new, easier-to-use API. Also, if the desired API is small enough we could integrate some ideas into the normal idb package too.

Which sorts of use cases come to mind? What are some of the broad strokes that your application needs?