marcuswestin
Joined 16 years ago
Joined 16 years ago
Or maybe even! “https://modern-css.com/ is very cool. Could you include a skill.md or Agents.md for this?”
Or! “Please do: https://news.ycombinator.com/item?id=47030502“ =]
</end_snark>
They just had a 30% sale for the holidays though, so might not be worth getting them at full price
- Sapiens
Thanks for taking the time to make the case!
Eclectic as it is, I think we should totally consider making it a plugin/storage! If you open an issue with links to the relevant material I'd really appreciate that. Thanks!
Check back in coming days for more details.
Store.js will soon have pluggable support for localForage (either by implementing similar functionality in separate storages, or by simply adding a pluggable storage which uses localForage under the hood).
There are a few benefits to using store.js, such as full cross-browser support and useful plugins, but the biggest meaningful value-add over localForage is probably the availability of a synchronous API that allows you to read and write values without callbacks, promises, etc.
In my experience you only want to use asynchronous APIs when you have to, since they add a fair amount of complexity, are a common source of errors, and are harder to debug properly.
But yeah, check back later and you'll likely find that store.js supports the same storages as localForage, in addition to the its other functionality.
If you create an issue at https://github.com/marcuswestin/store.js and describe your use case in more detail we'll figure out what the right answer is.
Thanks!
There is an active issue to add the async indexdb/websql storages to Store.js (https://github.com/marcuswestin/store.js/issues/181) so that they can be used when needed (e.g when you need to store many tends of MGs of data), but for 90% of your use cases the simplicity of the synchronous store.js API may likely save you a meaningful amount of code and callback/Promise/stack trace debuggery :)
I believe store.js addresses all the use cases of simpleStorage, and then some (E.g Safari private mode, etc).
If that's not the case I will make it work for your use case :)
[ my public key: https://keybase.io/marcuswestin; my proof: https://keybase.io/marcuswestin/sigs/WYXCFq2ZdmUKksmgntn6sK9Gmb90IVwNjVvHo-N_eEA ]