Back to Explore

unjs/perfect-debounce

GitHub
1 watchersOpen source

Last release: 4 months ago

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

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

Recent updates

  • v2.1.0

    4 months ago

    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

    9 months ago

    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