News for hackers. Stuff that matters.
Re:Moving beyond localStorage by tobltobs on Tuesday January 17, 2017 @04:02PM (#13421161)
For everybody starting to use indexedDB I recommend to take a look at Dexie.js (http://dexie.org/) for a minimalistic wrapper which might save you from a lot of pain as working directly with indexedDB is no fun imho.
Re:Moving beyond localStorage by andrewstuart2 on Tuesday January 17, 2017 @04:06PM (#13421187)
Another protip: localForage [1] makes it fairly easy to drop in IndexedDB if you're used to the localStorage interface. The only drawback is that you have to refactor into using promises, since IndexedDB is async.

[1] https://github.com/localForage/localForage

Re:Moving beyond localStorage by vmorgulis on Tuesday January 17, 2017 @04:21PM (#13421330)
Nice name and interesting API: https://news.ycombinator.com/item?id=13421321
Re:Moving beyond localStorage by pfooti on Tuesday January 17, 2017 @08:17PM (#13423191)
I'm a big fan of localForage. It handles the fallbacks on various devices. There's a few things it doesn't do super-well (multiple get/set operations in a batch, notably), but it's a great polyfill, especially if you don't want to mess around with the intricacies of indexedDB.
Re:Moving beyond localStorage by clemensley on Tuesday January 17, 2017 @08:07PM (#13423142)
Re:Moving beyond localStorage by cfilipov on Wednesday January 18, 2017 @01:18PM (#13428729)
+1 to that. In fact, it's a bad idea to not to use a wrapper. I started out thinking I didn't need it but found that I was implementing parts of Dexie (poorly). It's also very well documented.