# taskticker

> Run a series of functions in intervals.

Latest version **0.0.2** (published 2015-06-20) · MIT license · 0 weekly downloads

## Install

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

## 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 | 2015-06-20 |
| First published | 2015-06-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Quentin Engles |
| Maintainers | hollowdoor |

## Links

- npm: https://www.npmjs.com/package/taskticker
- Repository: https://github.com/hollowdoor/taskticker
- Issues: https://github.com/hollowdoor/taskticker/issues
- npm.io page: https://npm.io/package/taskticker

## Recent versions

- 0.0.2 (latest) — 2015-06-20
- 0.0.1 — 2015-06-20

## README

### Install

npm install taskticker

### Usage

```javascript
var taskCreator = require('taskticker'),
    run = taskCreator(),
    stack = taskCreator.stack(),
    count = 0;


run('count', function(){
    console.log('--'+(++count));
});

run('count', function(){
    console.log('--'+(++count));
});

stack('first', function(next){
    console.log('--first');
    next();
});
stack('second', function(){
    console.log('--second');
});
```

The functions are run according to the order they are defined.

## Interface

### taskCreator(integer milliseconds)

The integer argument is optional with a default of 1000.

```javascript
var taskCreator = require('taskticker'),
    run = taskCreator(),
    count = 0;


run('count', function(){
    console.log('--'+(++count));
});

run('count', function(){
    console.log('--'+(++count));
});
```


### taskCreator.stack(integer)

Same as taskCreator, but this is the async version.

Calling the `next` callback in your function calls the next function in the stack.

```
var taskCreator = require('taskticker'),
    stack = taskCreator.stack(),
    count = 0;

stack('first', function(next){
    console.log('--first');
    //call the second function in the stack.
    next();
});
stack('second', function(){
    console.log('--second');
});
```

### What's taskticker for?

What ever you want to use it for, but testing might be a good idea.

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