Socket
Socket
Sign inDemoInstall

requestanimationframe-timer

Package Overview
Dependencies
2
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    requestanimationframe-timer

setTimeout and setInterval by using requestAnimationFrame


Version published
Weekly downloads
9.7K
increased by5.09%
Maintainers
1
Install size
41.0 kB
Created
Weekly downloads
 

Changelog

Source

3.0.3 (2020-01-08)

Bug Fixes

  • type and export issue (8c18bb7)

Readme

Source

requestanimationframe-timer

setTimeout and setInterval by using requestAnimationFrame

Install

npm install --save-dev requestanimationframe-timer

Usage

import { setInterval, setTimeout, clearInterval, clearTimeout } from 'requestanimationframe-timer';

const id_1 = setTimeout((a) => console.log(a), 1000, '1000 ms timeout');
const id_2 = setInterval((a) => console.log(a), 2000, '2000 ms interval');
setTimeout(() => {
  clearTimeout(id_1);
  clearInterval(id_2);
}, 10000);

Maintainers


Chua Kang Ming

Keywords

FAQs

Last updated on 08 Jan 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc