houhou
A small toolkit that adds retry, timeout, and fallback behavior to any function that can fail — like a network call — so a flaky API doesn't crash your whole app.
🔗 Visit houhouDescription
Any code that calls a network API, a database, or another service will eventually fail sometimes — the question is what your code does when that happens. Most developers end up writing the same ad-hoc retry-and-timeout logic over and over. houhou packages that pattern into a small, dependency-free TypeScript library so you can wrap a risky function once and get consistent, well-tested failure handling.
It provides five composable policies: Retry (re-run a failed call with fixed or exponential backoff), Timeout (cap how long an operation is allowed to run), Fallback (run alternative logic if the primary call fails), Circuit Breaker (a closed/open/half-open state machine that stops hammering a service that's clearly down), and Delay (wait before executing). Policies chain through a fluent API, and because of how they nest, execution order runs opposite to how you declare them — `.retry(3).timeout(1000)` wraps the timeout around each retry attempt, not the whole retry sequence. It uses native AbortController for cancellation and resource cleanup, merging external AbortSignal instances with its own via AbortSignal.any(), and ships with full compile-time TypeScript type safety and zero runtime dependencies. It's MIT licensed and free.
💬 Our review
The short version: if you've ever hand-rolled a retry loop with a setTimeout and a counter, houhou replaces that with a tested, composable, type-safe version of the same idea — and being zero-dependency means it doesn't drag anything else into your bundle.
Compared to heavier resilience libraries like Polly (for .NET) or Resilience4j (Java), houhou is a much lighter, TypeScript-native equivalent — there isn't a dominant, widely-adopted zero-dependency resilience library in the JS/TS ecosystem the way those exist for .NET and Java, so houhou is filling a real gap. Against just writing your own retry/timeout code inline, the value is consistency and correctness — circuit breakers and AbortSignal-based cancellation are easy to get subtly wrong by hand, and this project has already worked through those edge cases. The tradeoffs are what you'd expect from a very young library (2 GitHub stars at review time): a small community, limited battle-testing at scale, and the reverse-order policy nesting is a genuine learning curve — read the docs before assuming `.retry().timeout()` does what it sounds like it does.
💰 Pricing
📊 Global score
🤖 AI-enriched data
Gratuit, licence MIT
Pros
Zéro dépendance, typage TypeScript complet au compile-time
Cinq politiques composables (retry, timeout, fallback, circuit breaker, delay)
Annulation propre via AbortController natif
API fluide et lisible par chaînage de méthodes
Gratuit, licence MIT
Cons
Ordre d'exécution des politiques imbriquées contre-intuitif (inverse de la déclaration)
Projet très jeune (2 étoiles GitHub), peu éprouvé en production
Pas d'équivalent direct établi pour comparer la maturité (marché JS/TS encore peu structuré sur ce créneau)
