# con-task-runner

> Simple library to enable you run task concurrently.

Latest version **1.0.1** (published 2019-09-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install con-task-runner
pnpm add con-task-runner
yarn add con-task-runner
bun add con-task-runner
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2019-09-05 |
| First published | 2019-09-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 9.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | vivek.brohma |

## Links

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

## Recent versions

- 1.0.1 (latest) — 2019-09-05
- 1.0.0 — 2019-09-05

## README

# con-task-runner

Simple library to enable you run task concurrently.

## Installation

`npm install con-task-runner` or `yarn add con-task-runner`

## Usage

```js
import Concurrency from 'con-task-runner';
```

(Using common js)

```js
const { default: Concurrency } = require('con-task-runner');
```

Continue
```ts
import Concurrency from 'con-task-runner';

const tasks = [...];

const concurrency = 5;
const limit = tasks.length;

const taskRunner = Concurrency({ concurrency, limit } /* Options */);

taskRunner(async (taskIndex) => {
	await tasks[taskIndex]();
})
	.then(() => {
		console.log('All task completed successfully.');
	})
	.catch(() => {
		console.log('Some tasks couldn\'t be completed after max retries limit.');
	});
```

Options interface
```ts
interface Options {
	concurrency: number,
	limit: number,
	maxErrorRetries?: number,
	ignoreError?: boolean,
}
```

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