# co-sse-events

> A sse stream based on events. Wrap an `emitter` with this module to emit sse events.

Latest version **0.0.6** (published 2014-05-04) · 0 weekly downloads

## Install

```sh
npm install co-sse-events
pnpm add co-sse-events
yarn add co-sse-events
bun add co-sse-events
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2014-05-04 |
| First published | 2014-04-25 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | queckezz |

## Links

- npm: https://www.npmjs.com/package/co-sse-events
- npm.io page: https://npm.io/package/co-sse-events

## Dependencies (2)

- [co-queue](https://npm.io/package/co-queue.md) ^2.0.0
- [array-iterator](https://npm.io/package/array-iterator.md) 0.0.1

## Recent versions

- 0.0.6 (latest) — 2014-05-04
- 0.0.5 — 2014-05-04
- 0.0.4 — 2014-05-04
- 0.0.3 — 2014-04-26
- 0.0.2 — 2014-04-26
- 0.0.1 — 2014-04-25

## README

# co-sse-events

A sse stream based on events. Wrap an `emitter` with this module to emit sse events.

## Installation

```bash
$ npm install co-sse-events
```

## Example

Returns events in sequence based on the [sse spec](http://www.w3.org/TR/2009/WD-eventsource-20091029/)
```js
var emitter = new Emitter;

var e;
while (e = yield sse(emitter)) {
  console.log(e.out)
  /* ->
   *   event: test
   *   data: { some: prop }
   *
   * ->
   *   event: test
   *   data: 'prop'
   */
}

emitter
  .emit('test', { some: prop })
  .emit('test', 'prop')
```

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