@essentials/request-interval
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

@essentials/request-interval

Bundlephobia Types NPM Version MIT License

npm i @essentials/request-interval

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

Quick Start

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

Package Sidebar

Install

npm i @essentials/request-interval

Weekly Downloads

184

Version

1.2.0

License

MIT

Unpacked Size

13.8 kB

Total Files

20

Last publish

Collaborators

  • jaredlunde