# swarm-client

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

Latest version **1.0.16** (published 2016-01-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install swarm-client
pnpm add swarm-client
yarn add swarm-client
bun add swarm-client
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.16 |
| Published | 2016-01-06 |
| First published | 2015-12-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2665 |
| Author | Victor Grishchenko |
| Maintainers | gritzko |

## Links

- npm: https://www.npmjs.com/package/swarm-client
- Repository: https://github.com/gritzko/swarm
- Homepage: http://github.com/gritzko/swarm
- Issues: https://github.com/gritzko/swarm/issues
- npm.io page: https://npm.io/package/swarm-client

## Dependencies (2)

- [minimist](https://npm.io/package/minimist.md) ^1.2.0
- [swarm-replica](https://npm.io/package/swarm-replica.md) 1.0.x

## Recent versions

- 1.0.16 (latest) — 2016-01-06
- 1.0.9 (nightly) — 2015-12-18
- 1.0.15 — 2016-01-03
- 1.0.14 — 2015-12-31
- 1.0.12 — 2015-12-25
- 1.0.8 — 2015-12-18
- 1.0.7 — 2015-12-18
- 1.0.6 — 2015-12-17

## README

# 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`.

---
_Source: https://npm.io/package/swarm-client · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
