DEV Community

Cover image for Temporize, Promise-aware debounce and throttle for TypeScript
nyvexis1
nyvexis1

Posted on

Temporize, Promise-aware debounce and throttle for TypeScript

I built Temporize because traditional debounce/throttle utilities don’t compose particularly well with async TypeScript.
Every scheduled call returns a real Promise with inferred arguments and return types. It also supports AbortSignal, cancellation, flushing, async overlap policies, FIFO rate limiting, batching, retries, concurrency limits, and optional React/Vue adapters.
The package has zero runtime dependencies and ships ESM and CommonJS
npm: https://www.npmjs.com/package/@alsoftworks/temporize
GitHub: https://github.com/nyvexis1/temporize
Feedback on the API and async cancellation semantics would be especially useful.

Top comments (0)