Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@variablesoftware/ts-retry-backoff

variablesoftware195MIT0.1.2TypeScript support: included

🎛️🔁🚀 A tiny, zero‑dependencies retry helper with exponential backoff + jitter—usable for KV, HTTP, Durable Objects, or any async function.

typescript, retry, backoff, exponential-backoff, jitter, async, promise, promise-retry, resilience, retries, exponential, failure, failure-recovery, timeout, delay, throttle, zero-dependencies

readme

@variablesoftware/ts-retry-backoff 🎛️🔁🚀

Test Suite NPM version License Coverage Bundle Size Downloads PRs Welcome

🎛️🔁🚀 A tiny, zero‑dependencies retry helper with exponential backoff, jitter, min/max delay, and multiple strategies—usable for KV, HTTP, Durable Objects, or any async function.


Keep your calls resilient with a single import—no more duplicated retry logic across your codebase! ♻️


Documentation

See docs/README.md for full API, usage, and examples.

See Size Comparison for bundle size and alternatives.


Installation

yarn add @variablesoftware/ts-retry-backoff
# or
npm install @variablesoftware/ts-retry-backoff

Options (Summary)

  • maxRetries?: number
  • baseDelayMs?: number
  • minDelayMs?: number
  • maxDelayMs?: number
  • strategy?: (attempt: number, baseMs: number) => number
  • jitter?: number
  • retryOn?: (err: unknown) => boolean
  • onRetry?: (err: unknown, attempt: number, delay: number) => void
  • onSuccess?: (result: unknown, attempt: number) => void
  • onGiveUp?: (err: unknown, attempt: number) => void
  • signal?: AbortSignal

📄 License

MIT © Rob Friedman / Variable Software


Built with ❤️ by @variablesoftware
Thank you for downloading and using this project. Pull requests are warmly welcomed!


🌐 Inclusive & Accessible Design

  • Naming, logging, error messages, and tests avoid cultural or ableist bias
  • Avoids assumptions about input/output formats or encodings
  • Faithfully reflects user data — no coercion or silent transformations
  • Designed for clarity, predictability, and parity with underlying platforms (e.g., Cloudflare APIs)
  • Works well in diverse, multilingual, and inclusive developer environments

Keep your calls resilient with a single import—no more duplicated retry logic across your codebase! ♻️

changelog

0.1.2 (2025-05-31)

Bug Fixes

  • (package): Update exports field to use correct module entry point 🪄 (4344560)

0.1.1 (2025-05-31)

Bug Fixes

  • empty commit 🪄 (191a3d8)
  • empty commit bump to fix version. 🪄 (783135e)

0.1.0 (2025-05-27)

Bug Fixes

  • Implement code changes to enhance functionality and improve performance (2922661)

Features

  • Add coverage and download badges to README.md 📄✨ (ac6354c)