# kesen

> Kesen is an isomorphic Javascript DDP Client

Latest version **0.2.0** (published 2019-02-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install kesen
pnpm add kesen
yarn add kesen
bun add kesen
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2019-02-18 |
| First published | 2019-02-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 266.8 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Miguel A. Mejias |
| Maintainers | plitex |
| Keywords | Meteor, DDP, Client, MobX |

## Links

- npm: https://www.npmjs.com/package/kesen
- Repository: https://github.com/plitex/kesen
- Issues: https://github.com/plitex/kesen/issues
- npm.io page: https://npm.io/package/kesen

## Dependencies (7)

- [mobx](https://npm.io/package/mobx.md) ^5.1.2
- [uuid](https://npm.io/package/uuid.md) ^3.3.2
- [debug](https://npm.io/package/debug.md) ^4.1.0
- [mingo](https://npm.io/package/mingo.md) ^2.2.10
- [@types/uuid](https://npm.io/package/@types/uuid.md) ^3.4.4
- [@types/debug](https://npm.io/package/@types/debug.md) ^4.1.0
- [eventemitter3](https://npm.io/package/eventemitter3.md) ^3.1.0

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 0.2.0 (latest) — 2019-02-18
- 0.1.0 — 2019-02-18
- 1.0.0-alpha.0 — 2019-02-13

## README

# Kesen (WORK IN PROGRESS)

An isomorphic Javascript DDP Client

## Install

```bash
$ yarn add kesen
```

## How to use

Auto init (Browser only):

```js
import Kesen, { Collection } from 'kesen';

// Create a collection
const Tasks = new Collection('tasks');

// Call a method
Kesen.call('insertTask', 'Destroy asteroids').then(
  result => console.log(result),
  error => console.log('Error:', error)
);

// Subscribe to reactive data
Kesen.track(subscribe => {
  const subsHandle = subscribe('tasks');
  if (subsHandle.ready()) {
    console.log(Tasks.find().all());
  }
});
```

Custom init (default client):

```js
import { createClient, Collection } from 'kesen';

createClient('default', `ws//myhost:7890/ws`);

// Create a collection
const Tasks = new Collection('tasks');

// Call a method
Kesen.call('insertTask', 'Destroy asteroids').then(
  result => console.log(result),
  error => console.log('Error:', error)
);

// Subscribe to reactive data
Kesen.track(subscribe => {
  const subsHandle = subscribe('tasks');
  if (subsHandle.ready()) {
    console.log(Tasks.find().all());
  }
});
```

## Examples

[Simple Todos React](https://github.com/plitex/kesen-simple-todos-react-example)

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