perfect-debounce provides an improved debounce function that supports Promise-returning and async functions, helping avoid duplicate calls while a promise is being resolved. It supports configurable leading and trailing behavior and adds control methods like cancel(), flush(), and isPending() for managing pending invocations.
Project status
- Actively maintained: The repo has an upstream push on 2026-06-09, and the most recent published package update is v2.1.0 on 2026-01-21, suggesting ongoing work rather than abandonment.
- Update cadence: Published updates appear to be on the order of a few to several months (v2.0.0 on 2025-08-22, then v2.1.0 on 2026-01-21). There have been no published updates since v2.1.0, but there is activity today, which may precede a future update.
AI summary generated
Recent updates
v2.1.0
v2.1.0 primarily exposes the `DebouncedReturn` TypeScript type as a public export. The code change is small, but the release also updates development tooling versions (TypeScript/Vitest/ESLint/etc.), which are not mentioned in the release notes.
Featuresv2.0.0
v2.0.0 introduces new debounce control methods to enhance how consumers can manage debounce behavior. The release also switches the package to ESM-only distribution, which may require updating import syntax in existing projects.
BreakingFeatures