# eventseries

> Serialise a series of asynchronous events which you'd normally prefer to have synchronous but can't afford to block.

Latest version **0.0.4** (published 2014-09-24) · 0 weekly downloads

## Install

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

## 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.4 |
| Published | 2014-09-24 |
| First published | 2014-09-22 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | rmp |

## Links

- npm: https://www.npmjs.com/package/eventseries
- npm.io page: https://npm.io/package/eventseries

## Dependencies (2)

- [mocha](https://npm.io/package/mocha.md) 1.21.4
- [xunit-file](https://npm.io/package/xunit-file.md) 0.0.5

## Recent versions

- 0.0.4 (latest) — 2014-09-24
- 0.0.3 — 2014-09-24
- 0.0.2 — 2014-09-22
- 0.0.1 — 2014-09-22

## README

# eventseries

Serialise a series of asynchronous events which you'd normally prefer to have synchronous but can't afford to block.

Have you ever wanted to run a function on an array of objects and tried something like:

    array.forEach(function(o) { console.log(o); });

and noticed that they're not guaranteed to be in order?

    require('eventseries');
    
    var exptSequence = new eventseries({
       'order'  : ['fred','betty','barney','wilma'], /* the sequence in which to fire named callbacks */
    
       'callbacks' : {
           /* Named callbacks.
              Each is passed the sequence object.
              Each should call next() when finished */
    
           'fred'   : function(seq) { console.log("one");   seq.next(); },
           'betty'  : function(seq) { console.log("two");   seq.next(); },
           'barney' : function(seq) { console.log("three"); seq.next(); },
           'wilma'  : function(seq) { console.log("four");  seq.next(); }
       }
    });

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