Skip to content

A micro JavaScript library for running repetitive tasks

License

Notifications You must be signed in to change notification settings

theshem/Repeatr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Repeatr

A micro JavaScript library for repetitive tasks

Example

"Talk is cheap, show me the code" — Linus Torvalds

var job1 = Repeatr()
                .do(function() { /*...*/ })
                .every(1000)
                .start();

var job2 = Repeatr()
                .do(function() { /*...*/ })
                .do(function() { /*...*/ })
                .for(5) // times
                .every(2000) // interval
                .delay(1000) // initial delay
                .start();

job1.stop(); // stops the repetitive calls
job1.reset(); // resets the counter as if it isn't invoked

// Cheers!

About

A micro JavaScript library for running repetitive tasks

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages