
Security News
TC39 Advances 11 Proposals for Math Precision, Binary APIs, and More
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.
task-repeater
Advanced tools
A tiny (657B Gzipped) micro library to manage repeated tasks with ease.
yarn install
import TaskRepeater from 'task-repeater';
const job1 = TaskRepeater()
.do(() => { /*...*/ })
.every(1000)
.start();
const job2 = TaskRepeater()
.do((itteration) => console.log(`itteration No.${itteration} ...`))
.do(() => { /*...*/ })
.finally((itterationsDone) => console.log(`tasks done. ${itterationsDone} itterations were completed.`))
.for(5) // times
.every(2_000) // interval in miliseconds
.delay(1_000) // initial delay in miliseconds
.start();
job1.stop(); // stops the repetitive calls
job1.reset(); // resets the counter as if it isn't invoked
👤 Omid Astaraki omid.ocean@gmail.com
this package is based on Repeatr library developed by @theshem.
Contributions, issues and feature requests are welcome!
Feel free to check issues page. You can also take a look at the contributing guide.
Give a ⭐️ if this project helped you!
Copyright © 2021 Omid Astaraki omid.ocean@gmail.com.
This project is MIT licensed.
FAQs
A micro JavaScript library for running repetitive time-based tasks
We found that task-repeater demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.