npm.io
0.0.4 • Published 7 years ago

@liuyunjs/timer

Licence
MIT
Version
0.0.4
Deps
0
Size
19 kB
Vulns
0
Weekly
0
Stars
1

install


@npm: npm install @liuyunjs/timer -S

@yarn: yarn add @liuyunjs/timer

Quick


import Timer from '@liuyunjs/timer';

const timer = new Timer();

timer.setTimeout(() => console.log('hello world'), 1000);
timer.clearTimeout();

timer.setInterval(() => console.log('hello world'), 1000);
timer.clearInterval();

timer.rAF(() => console.log('hello world'));
timer.cAF();