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
- The repository appears actively maintained, with a recent upstream push on 2026-06-05 and tagged updates in 2025-08 and 2026-01.
- Update cadence looks moderate, v2.0.0 (2025-08-22) to v2.1.0 (2026-01-21) is about 5 months, and there are no newer version tags shown since v2.1.0.
AI summary generated Today
Recent updates
v2.1.0
4 months agov2.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
9 months agov2.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