1.0.5 • Published 4 years ago

@jswork/raf-timeout v1.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

raf-timeout

Behaves the same as setTimeout except uses requestAnimationFrame() where possible for better performance.

version license size download

installation

npm install @jswork/raf-timeout

usage

import rafTimeout from '@jswork/raf-timeout';

const timer = rafTimeout(() => {
  console.log('1s, task started.');
}, 1000);

license

Code released under the MIT license.