just_debounce_it
4.1.0, released 5 years ago by qrl.app
A lightweight debounce library for Dart functions and streams.
WASM-ready
What it does
It allows you to delay the execution of a function until a specified timeout has passed without further calls. It also provides a stream transformer to debounce stream events.
AI-written summary of version 4.1.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to prevent a function from running too often, e.g., search input or button taps.
- You want to debounce events coming from a stream, such as sensor data or UI events.
Skip it when
- You need complex state management or reactive patterns beyond simple debouncing.
- You require a full-featured debounce library with additional utilities like throttling or distinct filtering.
Strengths
- Zero dependencies, works on all platforms.
- Supports named arguments and positional arguments.
- Provides both function and stream debouncing in a single package.
- Simple API with static methods.
Weaknesses
- No throttling or distinctUntilChanged utilities.
- Limited to debouncing; no other stream operators.
- No integration with state management libraries.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
import 'package:just_debounce_it/just_debounce_it.dart';
Debounce.milliseconds(500, print, ['Hello']);Alternatives
Packages that do the same job and could replace just_debounce_it.
- function_filter
Zero-dependency Dart library for debouncing, throttling, rate limiting and call aggregation.
50Compare - schedulers
Dart library for running asynchronous functions on time with interval, rate, parallel, and lazy controls.
48Compare - memoized
Cache function results with optional LRU and expiry support
45Compare