mirror of
https://github.com/duke-git/lancet.git
synced 2025-10-30 10:16:29 +08:00
test&doc: add example and update doc for function package
This commit is contained in:
@@ -83,7 +83,7 @@ func Delay(delay time.Duration, fn any, args ...any) {
|
||||
unsafeInvokeFunc(fn, args...)
|
||||
}
|
||||
|
||||
// Debounced creates a debounced function that delays invoking fn until after wait duration have elapsed since the last time the debounced function was invoked..
|
||||
// Debounced creates a debounced function that delays invoking fn until after wait duration have elapsed since the last time the debounced function was invoked.
|
||||
// Play: https://go.dev/play/p/absuEGB_GN7
|
||||
func Debounced(fn func(), duration time.Duration) func() {
|
||||
// Catch programming error while constructing the closure
|
||||
|
||||
Reference in New Issue
Block a user