BREAKING - Reworked debounce system:
rising
and falling
have been removed.immediate
and idle
with new behavior.
immediate
(default & recommended) will trigger immediately, then queue all subsequent calls until the timeout has passed.idle
will trigger the last queued call only after there haven't been any subsequent calls for the specified timeout.Debouncer
class for more advanced control over debouncing, and with that the following changes:
debounce()
function can still be called as usual (after replacing the edge type names with the new ones). Internally, it will instantiate a Debouncer
instance, which is available via the debouncer
property on the returned function.