A small utility to run promise based services in a regular interval
Build small async services
npm i async-service-builder
or
yarn add async-service-builder
import { build } from 'async-service-builder';
const serviceA = build(async() => {
// do your async work
});
const serviceB = build(async() => {
// do your async work
}, 10000);
serviceA(); // runs every 5 seconds
serviceB(); // runs every 10 seconds