Settings

Theme

Jaadi.js – JS Storage Abstraction

github.com

13 points by geeku 12 years ago · 5 comments

Reader

streptomycin 12 years ago

There's already like 8 million of these. Yet when people make new ones, they never include a comparison to any of the 8 million existing ones that do the same thing. So I really doubt this is better than https://github.com/brianleroux/lawnchair or https://github.com/mozilla/localForage or many others.

terinjokes 12 years ago

W3C Storage has a few exception behaviors this abstraction doesn't handle and thus might be something to worry about:

* setItem(key, value) can throw a QuotaExceededError. * Any of the Local Storage methods can throw a SecurityError. I have in my notes that Chrome does this when a user disables cookies.

  • masklinn 12 years ago

    There's a second problem: this thing is synchronous, so it's not possible to create a backend for WebSQL, IndexedDB or remote storage, or to store stuff in (possibly shared) WebWorkers.

    • terinjokes 12 years ago

      Ah yes, that's another huge problem! I'm so used to things being async that I didn't even see that.

bboyan 12 years ago

Look at PouchDB

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection