1.0.5 • Published 4 years ago
@jswork/raf-timeout v1.0.5
raf-timeout
Behaves the same as setTimeout except uses requestAnimationFrame() where possible for better performance.
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.