# timed-reduction-counter

> Timed Reduction Counter =======================

Latest version **2.0.0** (published 2016-12-18) · BSD license · 0 weekly downloads

## Install

```sh
npm install timed-reduction-counter
pnpm add timed-reduction-counter
yarn add timed-reduction-counter
bun add timed-reduction-counter
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2016-12-18 |
| First published | 2016-12-11 |
| Weekly downloads | 0 |
| License | BSD |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | fzzzt |

## Links

- npm: https://www.npmjs.com/package/timed-reduction-counter
- npm.io page: https://npm.io/package/timed-reduction-counter

## Recent versions

- 2.0.0 (latest) — 2016-12-18
- 1.3.0 — 2016-12-17
- 1.2.1 — 2016-12-11
- 1.2.0 — 2016-12-11
- 1.1.0 — 2016-12-11
- 1.0.1 — 2016-12-11

## README

Timed Reduction Counter
=======================

A simple incrementable counter which reduces the count periodically.

Usage
-----

	var trc = new (require('timed-reduction-counter')).TimedReductionCounter({
		limit: 3, // count limit
		interval: 2000 // ms
	});

	trc.count('key'); // 0 + 1 = 1
	trc.count('key', 3) // 1 + 3 = 4
	trc.isOverLimit('key'); // true (4)

	// wait 2 seconds
	setTimeout(() => {
		trc.isOverLimit('key'); // false (3)
	}, 2000);

	trc.stop(); // clear timer

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