An, IndexedDB, localStorage and sessionStorage adapter for Backbone.
It's a drop-in replacement for Backbone.sync()
to handle saving to the browser's local storage.
Create your collections like so:
const SomeCollection = Backbone.Collection.extend({
// The first parameter is the storage name, the second parameter is the
// storage type.
// Possible values are: session, local and indexed
browserStorage: new Backbone.BrowserStorage.session("SomeCollection", "session"),
// ... everything else is normal.
});
This package started as a fork of jeromegn's Backbone.localStorage