retain-localstorage

0.2.1 • Public • Published

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.

Package Sidebar

Install

npm i retain-localstorage

Weekly Downloads

1

Version

0.2.1

License

MIT

Last publish

Collaborators

  • giuliandrimba