Skip to content

A mixin for Backbone.sync to synchronize to session or local storage instead of a remote server.

License

Notifications You must be signed in to change notification settings

russplaysguitar/backbone-storage-sync

This branch is 6 commits behind Cormant-Incorporated/backbone-storage-sync:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

aae4f4a · Dec 21, 2018

History

13 Commits
Dec 21, 2018
Oct 8, 2015
Jan 20, 2016
Jan 20, 2016
Jan 20, 2016
Dec 21, 2018
Jan 21, 2016
Jan 21, 2016

Repository files navigation

backbone-storage-sync

A mixin for Backbone.sync to synchronize to session or local storage instead of a remote server.

Build Status

Usage:

  1. Mix this object into a Backbone Model (or Collection) using Backbone.Model.extend(StorageSyncMixin) (or Backbone.Collection.extend(StorageSyncMixin)).
  2. Define syncStore and syncKey within the Backbone Model (or Collection): - syncStore is an object to sync to, such as window.sessionStorage. May be a string or function. - syncKey is the property of the object to sync to. May be a string or function. For Backbone Models, this will be used as the model identifier (defined by idAttribute).
  3. Utilize Backbone Sync methods as normal. fetch, save, destroy, create, and sync are all supported.

About

A mixin for Backbone.sync to synchronize to session or local storage instead of a remote server.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%