async-service-builder

A small utility to run promise based services in a regular interval

async-service-builder

Build small async services

Documentation

Installation

npm i async-service-builder

or

yarn add async-service-builder

Usage

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
Loading...