Skip to content

Latest commit

History

31 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Go Debounce

Tests on Linux, MacOS and WindowsGoDoccodecovRelease

Example

funcExampleNew() {
varcounteruint64f:=func() {
atomic.AddUint64(&counter, 1)
}
debounced:=debounce.New(100*time.Millisecond)
fori:=0; i<3; i++ {
forj:=0; j<10; j++ {
debounced(f)
}
time.Sleep(200*time.Millisecond)
}
c:=int(atomic.LoadUint64(&counter))
fmt.Println("Counter is", c)
// Output: Counter is 3
}

About

A debouncer written in Go.

Resources

Stars

138 stars

Watchers

2 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages