Liking cljdoc? Tell your friends :D
ClojureScript only.

tincture.async

Adaptions of google closure library async Throttle and Debounce.

Source: https://medium.com/@alehatsman/clojurescript-throttle-debounce-a651dfb66ac

Adaptions of google closure library async Throttle and Debounce.

Source: https://medium.com/@alehatsman/clojurescript-throttle-debounce-a651dfb66ac
raw docstring

debouncecljs

(debounce listener interval)

Takes a listener function and interval and creates an instance of goog.async.Debounce Example usage:

(require '[goog.events :as gevents])
(gevents/listen
 js/window
 "resize"
 (debounce on-resize 200))
Takes a listener function and interval and creates an instance of
`goog.async.Debounce`
Example usage:
```clojure
(require '[goog.events :as gevents])
(gevents/listen
 js/window
 "resize"
 (debounce on-resize 200))
```
sourceraw docstring

throttlecljs

(throttle listener interval)

Takes a listener function and interval and creates an instance of goog.async.Throttle. Example usage:

(require '[goog.events :as gevents])
(gevents/listen
 js/document
 "scroll"
 (throttle on-scroll 200))
Takes a listener function and interval and creates an instance of
`goog.async.Throttle`.
Example usage:
```clojure
(require '[goog.events :as gevents])
(gevents/listen
 js/document
 "scroll"
 (throttle on-scroll 200))
```
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close