# request-pinger

> Creates a request interval with initial timeout and number of intervals.

Latest version **0.1.0** (published 2021-03-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install request-pinger
pnpm add request-pinger
yarn add request-pinger
bun add request-pinger
```

## 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.1.0 |
| Published | 2021-03-07 |
| First published | 2021-03-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | or-yam, |
| Maintainers | or-yam |
| Keywords | interval, pinger, ping, ping-server, server-pinger, request-interval, request-pinger |

## Links

- npm: https://www.npmjs.com/package/request-pinger
- Repository: https://github.com/webiya/request-pinger
- Homepage: https://github.com/webiya/request-pinger#readme
- Issues: https://github.com/webiya/request-pinger/issues
- npm.io page: https://npm.io/package/request-pinger

## Recent versions

- 0.1.0 (latest) — 2021-03-07

## README

# request-pinger

Creates a request interval with initial timeout and number of intervals.

## Installation

```sh
npm install request-pinger
```

or

```sh
yarn add request-pinger
```

## Usage Example

```javascript
import pinger from 'request-pinger';

setLoading = state => console.log(`loading: ${state}`);

const request = async () => {
  const data = await fetch('http://example.com/movies.json')
    .then(response => {
      return response;
    })
    .catch(error => error);

  console.log(data);
};

initialWait = 500; // in milliseconds
intervalWait = 1000; // in milliseconds
initialCounter = 5;

pinger(initialWait, intervalWait, initialCounter, request, setLoading);
```

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