Backbone localStorage and sessionStorage adapter
A localStorage and sessionStorage adapter for Backbone. It's a drop-in replacement for Backbone.Sync() to handle saving to the browser's browserStorage or sessionStorage database.
Usage
Include Backbone.browserStorage after having included Backbone.js:
Create your collections like so:
windowSomeCollection = BackboneCollection;
RequireJS
Include RequireJS:
RequireJS config:
require;
Define your collection as a module:
;
Require your collection:
;
CommonJS
If you're using browserify.
Install using npm install backbone.browserstorage
, and require the module.
BackboneBrowserStorage = ;
Acknowledgments
This package is a fork of jeromegn's Backbone.localStorage