winjsrocks-plugin-storage

0.6.7 • Public • Published

winjsrocks-plugin-storage

Contains storage related plugnis for the WinJSRocks MVVM Framework for WinJS apps.

This plugin extends the CoreLocalStorageProvider in WinJSRocks and adheres to the same API standard

Activation

To activate, import the plugin project from npm:

npm install winjsrocks-plugin-storage

Then, register in the WinJSRocks.Application.Instance.configure options within the plugins array:

var WinJSRocks = require('winjsrocks');
var WinJSRocksPluginStorage = require('winjsrocks-plugin-storage');
var app = new WinJSRocks.Application();
app.configure({
    plugins:[
      WinJSRocksPluginStorage // Provide the Class Definition of the Plugin
    ]
  },
  function(err){
  });

Switching Storage Provider

By default, the indexedDB storage provider is configured. To change this option, set the provider strategy in the app.configure call:

...
app.configure({
    plugins:[
      WinJSRocksPluginStorage // Provide the Class Definition of the Plugin
    ],
    storage: {
      provider: "indexeddb"
    }
  },
  function(err){
  });

TBD: Only indexedDB is implemented but others can be added by submitting a request at https://github.com/DeepElement/winjsrocks/issues

Package Sidebar

Install

npm i winjsrocks-plugin-storage

Weekly Downloads

0

Version

0.6.7

License

MIT

Last publish

Collaborators

  • toddpi314