osync

0.0.45 • Public • Published

Build Status

OSync - Javascript object synchronization

Transparently synchronize Javascript objects across application and clients

OSync provides object synchronization based on uris:

var object1 = new RemoteObject({
   _uri: '/remote/1',
   property: false
});
 
var object2 = new RemoteObject({
   _uri: '/remote/1',
   property: false
});
 
object1.property = true;
assert(object2.property === true); // object2 will automatically update property

Support

Nested properties:
remoteObject.object.array[0].object2.property = true;
Array modifications:
remoteObject.object.array.push(...);
remoteObject.object.array.pop(...);
remoteObject.object.array.shift(...);
remoteObject.object.array.unshift(...);
remoteObject.object.array.splice(...);
Nested remote objects:
var object = new RemoteObject({
   _uri: '/remote/1',
   property: false,
   object: new RemoteObject({
      _uri: '/remote/1',
      property: false
   })
});
object.array.push(new RemoteObject(...));
TODO:
  • Server MessageBus bridge
  • Extend remote object with new properties

Package Sidebar

Install

npm i osync

Weekly Downloads

9

Version

0.0.45

License

MIT

Last publish

Collaborators

  • fiolkaf