# anticipant

> callback executes when completed all the goals

Latest version **0.1.0** (published 2015-09-08) · ISC license · 0 weekly downloads

## Install

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

## 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.0 |
| Published | 2015-09-08 |
| First published | 2015-09-07 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Boris Chernysh |
| Maintainers | bakenbardyan |
| Keywords | async |

## Links

- npm: https://www.npmjs.com/package/anticipant
- Repository: https://github.com/bakenbard/anticipant
- Homepage: https://github.com/bakenbard/anticipant#readme
- Issues: https://github.com/bakenbard/anticipant/issues
- npm.io page: https://npm.io/package/anticipant

## Alternatives

- [@commercetools/sync-actions](https://npm.io/package/@commercetools/sync-actions.md) — 25.1K weekly downloads
- [cwait](https://npm.io/package/cwait.md) — 21.4K weekly downloads
- [@ledgerhq/hw-app-cosmos](https://npm.io/package/@ledgerhq/hw-app-cosmos.md) — 4.2K weekly downloads
- [@financial-times/o-loading](https://npm.io/package/@financial-times/o-loading.md) — 2.8K weekly downloads
- [fa](https://npm.io/package/fa.md) — 185 weekly downloads

## Recent versions

- 0.1.0 (latest) — 2015-09-08
- 0.0.1 — 2015-09-07

## README

# anticipant

## install

```bash
npm install anticipant
```

## example

```js
var Anticipant = require('anticipant');

anticipant = Anticipant.create(['task1', 'task2']);
anticipant.register('task3');

anticipant.then(function() {
	console.log('tasks 1, 2 and 3 done!')
});

anticipant.perform('task1');
anticipant.perform('task2');
anticipant.perform('task3');
// in console -> tasks 1, 2 and 3 done!
```

## methods and fields

```js
Anticipant.create(listOfTasks, resultFunction);
```
returned new anticipant instance.

```js
Anticipant.register(taskName)
```
register new task, if task already exists reset done flag to false.

```js
Anticipant.perform(taskName)
```
perform registered task. When all tasks are performed call result function.

```js
Anticipant.then(taskName)
```
register result function.

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