0.0.1 • Published 9 months ago

retry-utils v0.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
9 months ago

retry-utils

retry-utils is a lightweight and intuitive module that provides a simple yet powerful retry mechanism for your applications.

retry()

Retry any async function until it returns a meaningful value or the number of attempts is exhausted

delay()

Delay execution flow for sometime in milliseconds

Usage

import { retry, delay } from "retry-utils";

// Delay execution flow for 5 seconds
await delay(5000);

// Retries function at least 10 times with 3 seconds interval until it returns a value
await retry(
    () => true;
    {
        attempts: 10, // default 5
        delayMs: 5000, // default 3000
    })
0.0.1

9 months ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

0.0.6-rc

3 years ago

0.0.7-rc

3 years ago

0.0.4-rc

3 years ago

0.0.5-rc

3 years ago

0.0.3-rc

3 years ago

0.0.2-rc

3 years ago

0.0.1-rc

3 years ago

1.0.0

3 years ago