npm.io
0.0.4 • Published 12 years ago

koa-random-sse

Licence
MIT
Version
0.0.4
Deps
7
Vulns
0
Weekly
0

koa-random-sse

Sends random sse events, mainly for testing applications or modules like segmentio/sse.

Installation

$ npm install koa-random-sse

Example

var app = koa()
  .use(get('/', randomize(4)))

/**
 * Sents four random events in random intervals
 *
 * ->
 *   event: shout
 *   data: suggest
 *
 *   event: plan
 *   data: knowledge
 */

Test

$ make test

License

MIT

Keywords