0.2.1 • Published 10 years ago

retain-localstorage v0.2.1

Weekly downloads
4
License
MIT
Repository
github
Last release
10 years ago

Retain-LocalStorage

Retain localStorage plugin

Build Status

Example

To start saving the Retain data in the localStorage, simply inject the plugin into the Model.

var retain = require("retain");
var retainLocalStorage = require("retain-localstorage");

var Movies = retain();

Movies.use(retainLocalStorage, { name: "movies"});

Config

  • name: LocalStorage collection name.

Creating a plugin

Retain use Promises internally to transfer data between the plugins.

To create a plugin, it is necessary to implement each of the following Retain methods.

  • new
  • all
  • set
  • find
  • remove

Each of theses methods must return a promise.