Skip to content

retry

Retries the given function the specified number of times.

Usage

const result = await retry({ times: 3, delay: 1000 }, async () => {
return await fetch("https://example.com");
});

Installation

Terminal window
npx atmx add helper retry