# task-eater

> Control task package with jobs

Latest version **1.0.4** (published 2022-10-10) · MIT license · 0 weekly downloads

## Install

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

## Health

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

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

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2022-10-10 |
| First published | 2022-10-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 11.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Miguel Ferrer |
| Maintainers | dev_miguel |

## Links

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

## Recent versions

- 1.0.4 (latest) — 2022-10-10
- 1.0.3 — 2022-10-10
- 1.0.2 — 2022-10-10
- 1.0.1 — 2022-10-09
- 1.0.0 — 2022-10-08

## README

# Task Eater

## Description
Control task package with jobs

## Examples

```typescript
    // Simple job to change string to number
class StringToNumberJob implements IJob<string, number> {
    constructor() {}

    jobName: string = "StringToNumberJob";
    dispatch(input: string): Promise<number> {
    return new Promise((res, rej) => {
        res(parseInt(input, 10));
    });
    }
}

// Simple job get string to return same string
class StringJob implements IJob<string, string> {
    constructor(private initialValue: string) {}

    jobName: string = "StringJob";
    dispatch(input: string): Promise<string> {
    return new Promise((res, rej) => {
        res(input || this.initialValue);
    });
    }
}

const MyFirstTask = new Task({ name: "MyFirstTask" });
const result = await MyFirstTask.runJobs(
    new StringJob("81"),
    new StringToNumberJob(),
);
// expected result 81
```

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