# epicles

> A library for creating gearboxes which are composed of multiple gears and can tick on each time interval and emit tick event on each tick.

Latest version **2.1.2** (published 2021-04-02) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.2 |
| Published | 2021-04-02 |
| First published | 2021-03-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 25.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Mostafa Amini Nasab |
| Maintainers | mostafa_amini |
| Keywords | Gearbox, Epicycles |

## Links

- npm: https://www.npmjs.com/package/epicles
- Repository: https://github.com/M-Nasab/epicles
- Homepage: https://github.com/M-Nasab/epicles#readme
- Issues: https://github.com/M-Nasab/epicles/issues
- npm.io page: https://npm.io/package/epicles

## Recent versions

- 2.1.2 (latest) — 2021-04-02
- 2.0.2 — 2021-03-24
- 2.0.1 — 2021-03-24
- 2.0.0 — 2021-03-24
- 1.0.1 — 2021-03-23
- 1.0.0 — 2021-03-22

## README

# Epicles

[![Build Status](https://travis-ci.org/M-Nasab/epicles.svg?branch=main)](https://travis-ci.org/M-Nasab/epicles)
[![NPM Package](https://img.shields.io/npm/v/epicles)](https://www.npmjs.com/package/epicles)

A small periodic event emitter

## Installation

```
npm install --save epicles
```

## Usage

```javascript
import { epicles } from 'epicles';

// create an emitter with initial state [0, 0, 0]
const emitter = epicles({
    steps: 4,
    steppers: 3,
});

emitter.subscribe((event) => {
    console.log(event);
});

emitter.tick(); // [{ step: 1, stepper: 0 }]
emitter.tick(); // [{ step: 2, stepper: 0 }]
emitter.tick(); // [{ step: 3, stepper: 0 }]
emitter.tick(); // [{ step: 0, stepper: 0 }, { step: 1, stepper: 1 }]
emitter.tick(); // [{ step: 1, stepper: 0 }]

```

## Test

```
npm run test
```

## License

MIT

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