Skip to content
master
Go to file
Code
This branch is 13 commits ahead, 282 commits behind jeromegn:master.

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

README.md

Backbone localStorage Adapter

LocalStore adds localStorage-based persistence to a Backbone collection

Dependencies: Underscore.js, (Backbone.js is not a hard dependency)

Usage

Include Backbone.localStorage after having included Backbone.js:

<script type="text/javascript" src="backbone.js"></script>
<script type="text/javascript" src="backbone.localStorage.js"></script>

Create your collections like so:

window.SomeCollection = Backbone.Collection.extend({
  
  initialize: function() {
    new Store(this, "SomeCollection"); // Unique name within your app.
  }
  
  // ... everything else is normal.
  
});

Feel free to use Backbone as you usually would, this is a drop-in replacement.

About

A localStorage adapter for Backbone.js with database synchronization.

Resources

Releases

No releases published
You can’t perform that action at this time.