ts-retry
ts-retry copied to clipboard
A little retry tool for javascript/typescript
It can be used in JS code only providing a full path like: ``` import {retryAsyncDecorator} from 'ts-retry/lib/esm/retry/utils/decorators'; ``` But Jest test running the code importing it fails with ```...
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3. Commits 74b2db2 3.0.3 88f1429 update eslint. lint, fix unit tests. 415d660 Snyk js braces 6838727 (#40) 190510f fix tests, skip 1 test in test/braces.expand...
Bumps [path-to-regexp](https://github.com/pillarjs/path-to-regexp) from 1.8.0 to 1.9.0. Release notes Sourced from path-to-regexp's releases. Fix backtracking in 1.x Fixed Add backtrack protection to 1.x release (#320) 925ac8e Fix re.exec(&[#39](https://github.com/pillarjs/path-to-regexp/issues/39);/test/route&[#39](https://github.com/pillarjs/path-to-regexp/issues/39);) result (#267) 32a14b0...
retryUntilDefined and retryAsyncUntilDefined seem to retry also on error. Is there any way to make them retry only when undefined or null is returned but immediately bail out on any...
Something like this: ```ts export async function retryAsync(callback: () => Promise, options: { max: number, until: (lastResult: T) => boolean }) { let lastResult: T; for (let i = 0;...
Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.6. Changelog Sourced from cross-spawn's changelog. 7.0.6 (2024-11-18) Bug Fixes update cross-spawn version to 7.0.5 in package-lock.json (f700743) 7.0.5 (2024-11-07) Bug Fixes fix escaping bug...
Sometimes errors (such as rate limits) will include the wait time needed before retrying. This exposes the error to the delay callback. Also fixes the erro -> error typo, and...
Sometimes errors (such as rate limits) will include the wait time needed before retrying. This exposes the error to the delay callback. Also fixes the `erro` -> `error` typo, and...
Hi! I was testing this library using `bun`. I grabbed [the first code block from the delay family examples](https://github.com/franckLdx/ts-retry?tab=readme-ov-file#delay-family) and modified it a bit to test the `createExponetialDelay` function, since...