# cycle-pusher

> Cycle.js driver for pusher

Latest version **2.0.9** (published 2019-07-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install cycle-pusher
pnpm add cycle-pusher
yarn add cycle-pusher
bun add cycle-pusher
```

## Health

**Score 35/100 (D)** — status: abandoned.

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

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.0.9 |
| Published | 2019-07-16 |
| First published | 2017-10-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 16.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 11 |
| Author | unhappychoice |
| Maintainers | unhappychoice |
| Keywords | pusher, socket, realtime |

## Links

- npm: https://www.npmjs.com/package/cycle-pusher
- Repository: https://github.com/unhappychoice/cycle-pusher
- Homepage: https://github.com/unhappychoice/cycle-pusher#readme
- Issues: https://github.com/unhappychoice/cycle-pusher/issues
- npm.io page: https://npm.io/package/cycle-pusher

## Dependencies (2)

- [pusher-js](https://npm.io/package/pusher-js.md) ^4.2.1
- [@types/pusher-js](https://npm.io/package/@types/pusher-js.md) 3.0.30

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 2.0.9 (latest) — 2019-07-16
- 2.0.8 — 2018-01-05
- 2.0.7 — 2018-01-05
- 2.0.6 — 2018-01-05
- 2.0.5 — 2018-01-05
- 2.0.4 — 2018-01-05
- 2.0.3 — 2017-12-26
- 2.0.2 — 2017-12-02
- 2.0.1 — 2017-12-02
- 2.0.0 — 2017-10-29
- 1.0.4 — 2017-10-27
- 1.0.3 — 2017-10-27
- 1.0.2 — 2017-10-26
- 1.0.1 — 2017-10-26
- 1.0.0 — 2017-10-26

## README

# cycle-pusher
[![npm version](https://badge.fury.io/js/cycle-pusher.svg)](https://badge.fury.io/js/cycle-pusher)

cycle-pusher is pusher client for [cycle.js](https://cycle.js.org/)

### Types
```typescript
const makePusherDirver = (app_key: string, configuration: Config): Driver<Stream<PayloadInput>, PusherSource>

interface PusherSource {
    select(channelName: string, eventName: string): Stream<any>;
}

interface PayloadOutput {
    channelName: string;
    eventName: string;
    data: any;
}

interface PayloadInput {
    channelName: string;
    eventName: string;
    data: any;
}
```

### Usage

```typescript
function main(sources) {
    const content$ = sources.pusher.select("channel1", "event1") // Receive messages

    const payload$ = Stream.of({ // Send messages
        channelName: "channel1",
        eventName: "client-event1",
        data: { "key": "value" }
    });

    return {
        pusher: payload$
    };
}

const app_key = "";
const config = { // See pusher document
    encrypted: true
};

run(main, {
    pusher: makePusherDirver(app_key, config)
});

```

see example directory for real usage.

### License

see [LICENSE](./LICENSE)

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