Back to Explore

unjs/perfect-debounce

GitHub
2 watchersOpen source

Last release:

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 repo shows an upstream push as recently as 2026-09-09, which suggests ongoing maintenance, though the last described published update was v2.1.0 on 2026-01-21.
  • Update cadence appears uneven, with published updates about 5 months apart (v2.0.0 on 2025-08-22 to v2.1.0 on 2026-01-21), but a longer gap since the previous major update (over 1 year from v2.0.0 to the last detailed update).

AI summary generated

AI-generated from public sources. May be inaccurate. Report

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.

    Features
  • v2.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