Skip to content

Backbone.js driver for the localForage offline storage library

License

Notifications You must be signed in to change notification settings

NicBright/localForage-backbone

This branch is 69 commits behind localForage/localForage-backbone:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

b8a743c · May 7, 2014

History

23 Commits
May 7, 2014
Apr 19, 2014
Mar 19, 2014
Mar 19, 2014
Mar 17, 2014
Mar 17, 2014
Mar 17, 2014
May 7, 2014
Mar 17, 2014
Mar 19, 2014
May 7, 2014
May 7, 2014

Repository files navigation

localForage Backbone Build Status

Backbone.js driver for the localForage offline storage library.

Install with bower:

bower install localforage-backbone

Run tests with grunt:

grunt test

Submit issues, pull requests, etc. if something is up! <3

Usage

This library lets you override the sync() method on your collections and models so they're saved to localForage instead of a REST server. Simply override your objects' sync() method with the namespace for your model:

    var MyModel = Backbone.Collection.extend({
        sync: Backbone.localforage.sync('MyModel')
    });
    var MyCollection = Backbone.Collection.extend({
        model: MyModel,
        sync: Backbone.localforage.sync('MyCollection')
    });

Now whenever you save your collections or models, they'll be saved with localForage!

License

This program is free software; it is distributed under an Apache License.


Copyright (c) 2014 Mozilla (Contributors).

About

Backbone.js driver for the localForage offline storage library

Resources

License

Stars

Watchers

Forks

Packages

No packages published