# anticipate

> retries asynchronous functions until they succeed

Latest version **0.0.2** (published 2012-12-16) · BSD license · 0 weekly downloads

## Install

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

## 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.0.2 |
| Published | 2012-12-16 |
| First published | 2012-12-15 |
| Weekly downloads | 0 |
| License | BSD |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | @joshski |
| Maintainers | joshski |

## Links

- npm: https://www.npmjs.com/package/anticipate
- Repository: https://github.com/featurist/node-anticipate
- npm.io page: https://npm.io/package/anticipate

## Recent versions

- 0.0.2 (latest) — 2012-12-16
- 0.0.1 — 2012-12-15

## README

# anticipate

Retries asynchronous functions until they succeed.

## Install

npm install anticipate

#### Example  ([PogoScript](http://github.com/featurist/pogoscript))
    
    anticipate = require 'anticipate'
    
    anticipate.trying @(callback)
        something unreliable (callback)
    every 0.1 seconds for 3 tries @(result)
        it worked (result)
    else @(error)
        oh noes (error)

#### Example  (JavaScript)
    
    anticipate = require('anticipate');
    
    anticipate.tryingEverySecondsForTriesElse(function(callback) {
        somethingUnreliable(callback);
    }, 0.1, 3, function(result) {
        return itWorked(result);
    }, function(error) {
        return ohNoes(error);
    });

#### License
BSD

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