1.0.16 • Published 8 years ago

swarm-client v1.0.16

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

Swarm: generic client

A Swarm sync client. Use dependency injection for any particular storage or transport method (LevelUP and stream-url based, respectively).

API use example:

var SwarmClient = require('swarm-client');
require('stream-url-ws');

var swarm = new SwarmClient({
    user_id: 'joe',
    db_id:   'db',
    connect: 'ws://server.com:1234/swarm',
    callback: onConnected
});

function onConnected (err) {
    // rehydrate, subscribe, rerender, etc etc
    var obj = swarm.get('/Type#id', onObjectLoad);
}

function onObjectLoad () {
    // the data is live
}

for working examples, see the swarm-examples package. for a server-side daemon, see swarm-server.

1.0.16

8 years ago

1.0.15

8 years ago

1.0.14

8 years ago

1.0.12

8 years ago

1.0.9

8 years ago

1.0.8

8 years ago

1.0.7

8 years ago

1.0.6

8 years ago