houhou: Zero-Dependency TypeScript Library Adds Resilience Policies to Any Async Function
A new open-source TypeScript library called houhou allows developers to wrap any async function with composable resilience policies including retry, timeout, circuit breaker, fallback, and delay. Unlike existing solutions such as axios-retry or Polly.js, houhou is not tied to any specific HTTP client and requires no class-based boilerplate. The library is approximately 500 lines of code with zero external dependencies, and wrapped functions retain their original signatures. Policies are applied via a fluent chaining API, with execution order determined by nesting — the last method declared wraps all previous ones. houhou also leverages AbortController to cancel in-flight operations when a timeout fires or an external signal is received.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in