UNPKG

ts-retry

Version:

A little retry tool to execute a function until the function is successful. Can also bind a timeout to a function. This lib is usable in typescript, in javascript, in node, in SPA tools (rest, Vue, Svelte...) and browser (available in ESM and common js fo

8 lines (7 loc) 190 B
export let defaultDuration = 60 * 1000; export function setDefaultDuration(duration) { defaultDuration = duration; } export function getDefaultDuration() { return defaultDuration; }