realtime-sync-storage

0.2.7 • Public • Published

realtime-sync-storage

Cross-origin local storage realtime synchronizing.

Supported

  • IE(8+)
  • multi-site
  • Safari isn't supported

Install

Bower

bower install realtime-sync-storage --save

npm

npm install realtime-sync-storage --save

Usage

  • master source use
rsStorage(
    {
        //Single site is string, multi-site is array,the site's Synchronization URL of slave source(type String or Array)
        url:"http://othersite.com/src/otherSite/syncStorage.html",
        //Synchronization delay(type Number or Boolean),default:false
        delay:1000,
        //Whether bidirectional synchronization,default:false
        mutual:true,
        //Sync field, not set to all sync
        sync:['testA']
    },function(){
        //do something before each synchronization.
    },function(){
        //do something after each synchronization.
    }
);
  • slave source add 'src/otherSite/syncStorage.html' file.

License

This project is licensed under the MIT license.

Package Sidebar

Install

npm i realtime-sync-storage

Weekly Downloads

2

Version

0.2.7

License

MIT

Last publish

Collaborators

  • unadlib