# task-conveyor

> sequence task runner for async tasks

Latest version **0.1.1** (published 2017-05-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install task-conveyor
pnpm add task-conveyor
yarn add task-conveyor
bun add task-conveyor
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2017-05-03 |
| First published | 2017-05-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | ww.sun@outlook.com |
| Maintainers | wwsun |
| Keywords | task, runner, sequence |

## Links

- npm: https://www.npmjs.com/package/task-conveyor
- Repository: https://github.com/wwsun/task-conveyor
- Homepage: https://github.com/wwsun/task-conveyor#readme
- Issues: https://github.com/wwsun/task-conveyor/issues
- npm.io page: https://npm.io/package/task-conveyor

## Recent versions

- 0.1.1 (latest) — 2017-05-03
- 0.1.0 — 2017-05-03

## README

# task-conveyor

sequence task runner

### Usage

Install the package

```bash
npm intall task-conveyor
```

Create the task runner

```js
const createRunner = require('task-conveyor');
const runner = createRunner();

function* task1(before) {
  console.log(before);
  yield runner.next(null, 1);
}

function* task2(before) {
  console.log(before);
  yield runner.next(null, 2);
}

function* task3(before) {
  console.log(before);
}

function beforeEach() {
  console.log('>>>> write database');
}

const tasks = [ task1, task2, task3 ];
runner.init(tasks, beforeEach);
yield runner.next(null, 'init');
```

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