Socket
Socket
Sign inDemoInstall

requestanimationframe-timer

Package Overview
Dependencies
311
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    requestanimationframe-timer

<!-- [![npm][npm]][npm-url] [![deps][deps]][deps-url] [![test][test]][test-url] [![coverage][cover]][cover-url] [![chat][chat]][chat-url] -->


Version published
Maintainers
1
Install size
27.0 kB
Created

Changelog

Source

1.0.0 (2018-01-03)

FIRST RELEASE!!

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 03 Jan 2018

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