# again

> call function again and again

Latest version **0.0.1** (published 2012-09-27) · MIT license · 0 weekly downloads

## Install

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

## 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.1 |
| Published | 2012-09-27 |
| First published | 2012-09-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | jifeng |
| Maintainers | jifeng.zjd |
| Keywords | again |

## Links

- npm: https://www.npmjs.com/package/again
- Repository: https://github.com/jifeng/again
- npm.io page: https://npm.io/package/again

## Recent versions

- 0.0.1 (latest) — 2012-09-27

## README

again
=====

##概况

更加方便灵活地管理一个函数的定时执行和执行次数

##安装

    npm install again
     
##使用
    var again = require('again');
    var callTimes = 0;
    //每执行这个函数都使callTimes 加 1
    var addCallTimes = function (callback) {
      process.nextTick(function () {
        callback(null, callTimes++);
      });
    }
    
    //每个10ms，执行一遍addCallTimes
    var againForever = again(addCallTimes, 10);
    againForever(function (err, data) {
      console.log(data);
    });
    
    //每个10ms，执行一遍addCallTimes,一共执行100词
    var againHundredTimes = again(addCallTimes, 10, 100);
    againHundredTimes(function (err, data) {
      console.log(data);
    });

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