# tempo-tap

> tap tempo object measures speed of successive invocations

Latest version **1.0.5** (published 2019-07-03) · ISC license · 0 weekly downloads

## Install

```sh
npm install tempo-tap
pnpm add tempo-tap
yarn add tempo-tap
bun add tempo-tap
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2019-07-03 |
| First published | 2019-07-02 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Sam Parsons |
| Maintainers | sam_parsons |

## Links

- npm: https://www.npmjs.com/package/tempo-tap
- npm.io page: https://npm.io/package/tempo-tap

## Dependencies (1)

- [@types/node](https://npm.io/package/@types/node.md) ^12.0.10

## Recent versions

- 1.0.5 (latest) — 2019-07-03
- 1.0.4 — 2019-07-02
- 1.0.3 — 2019-07-02
- 1.0.2 — 2019-07-02
- 1.0.0 — 2019-07-02

## README

# Tempo Tap

tap tempo object to measure speed of successive invocations

## install

`npm install tempo-tap`

## example

```js
var { TapTempo } = require('tempo-tap');

let tempo = 0;

TapTempo.tap();
setTimeout(() => (tempo = TapTempo.tap()), 1000);
setTimeout(() => (tempo = TapTempo.tap()), 2000);
setTimeout(() => (tempo = TapTempo.tap()), 3000);
setTimeout(() => (tempo = TapTempo.tap()), 4000);

console.log(tempo); // 60
```

## TapTempo.tap()

records a tap with Date.now(), stores inside TimeContainer
returns current tempo or -1 for insufficient data

## TapTempo.getLastTempo()

returns the last calculated tempo as a number

## TapTempo.clear()

clears TimeContainer, reinitiates the object

## TapTempo.setThreshold()

sets how many values TimeContainer must contain until it can make a tempo calculation - default is 3

## license

Dual-licensed under the MIT License or the Apache License, version 2.0

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