# @essentials/request-interval

> A setInterval() function that uses requestAnimationFrame() in the background for ticks

Latest version **1.2.0** (published 2020-06-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install @essentials/request-interval
pnpm add @essentials/request-interval
yarn add @essentials/request-interval
bun add @essentials/request-interval
```

## Health

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

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

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2020-06-05 |
| First published | 2019-04-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 13.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 11 |
| Author | Jared Lunde |
| Maintainers | jaredlunde |
| Keywords | request interval, set interval, raf interval |

## Links

- npm: https://www.npmjs.com/package/@essentials/request-interval
- Repository: https://github.com/jaredLunde/essentials
- Homepage: https://github.com/jaredLunde/essentials/tree/master/packages/request-interval#readme
- Issues: https://github.com/jaredLunde/essentials/issues
- npm.io page: https://npm.io/package/@essentials/request-interval

## Dependencies (1)

- [@essentials/raf](https://npm.io/package/@essentials/raf.md) ^1.2.0

## Recent versions

- 1.2.0 (latest) — 2020-06-05
- 1.1.0 — 2020-04-25
- 1.0.3 — 2019-11-25
- 1.0.2 — 2019-04-07
- 1.0.1 — 2019-04-05
- 1.0.0 — 2019-04-05

## README

<hr>
<div align="center">
  <h1 align="center">
    @essentials/request-interval
  </h1>
</div>

<p align="center">
  <a href="https://bundlephobia.com/result?p=@essentials/request-interval">
    <img alt="Bundlephobia" src="https://img.shields.io/bundlephobia/minzip/@essentials/request-interval?style=for-the-badge&labelColor=24292e">
  </a>
  <a aria-label="Types" href="https://www.npmjs.com/package/@essentials/request-interval">
    <img alt="Types" src="https://img.shields.io/npm/types/@essentials/request-interval?style=for-the-badge&labelColor=24292e">
  </a>
  <a aria-label="NPM version" href="https://www.npmjs.com/package/@essentials/request-interval">
    <img alt="NPM Version" src="https://img.shields.io/npm/v/@essentials/request-interval?style=for-the-badge&labelColor=24292e">
  </a>
  <a aria-label="License" href="https://jaredlunde.mit-license.org/">
    <img alt="MIT License" src="https://img.shields.io/npm/l/@essentials/request-interval?style=for-the-badge&labelColor=24292e">
  </a>
</p>

<pre align="center">npm i @essentials/request-interval</pre>
<hr>

A `setInterval()` function that uses `requestAnimationFrame()` in the background for ticks

## Quick Start

```js
import {
  requestInterval,
  clearRequestInterval,
} from '@essentials/request-interval'

// Has the same API as setInterval
const handle = requestInterval(() => {}, 300)
// Has the same API as clearInterval
clearRequestTimeout(handle)
```

## LICENSE

MIT

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