nanobounce
Smol debounce package.
Usage
var Nanobounce = var html = var nanobounce = html` click me` { var value = etargetvalue }
Why?
Because most debounce functions don't work well when doing DOM diffing. This package is specifically made to work well with DOM diffing.
API
nanobounce = Nanobounce([timeout])
Create a new instance. Timeout defaults to 256ms
.
nanobounce(callback)
Debounce a callback for the duration of the timeout. The last callback wins if called multiple times in a row.