Skip to content

conversejs/Backbone.browserStorage

 
 

Repository files navigation

Backbone IndexedDB, localStorage and sessionStorage adapter

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.

XMPP Chat Build Status

Usage

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.
});

Acknowledgments

This package started as a fork of jeromegn's Backbone.localStorage

About

A localStorage and sessionStorage adapter for Backbone.js

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 97.6%
  • Makefile 2.4%