Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Limiter ¶
type Limiter struct {
// contains filtered or unexported fields
}
func (*Limiter) Call ¶
func (d *Limiter) Call(f func())
Call schedules the given function to be called after duration. If Call is called again before the duration expires, it will be a No-Op.
func (*Limiter) Fn ¶
func (d *Limiter) Fn(f func())
Fn calls the given function if the debounced function is not called for the given duration. If the debounced function is called before the duration expires, the given function will not be called and the timer will be reset. This function will be called when the debounced function stops being called for the given duration. The debounced function can be invoked with different functions, if needed, the last one will win.
Click to show internal directories.
Click to hide internal directories.