Liking cljdoc? Tell your friends :D

cljs-await.core


awaitcljs

(await promise)

works with JS promises

returns [err res]

where err - a catched exception (reject) res - the result of the promise work (resolve)

(go (let [[err res] (<! (await my-promise))] (println res)))

works with JS promises

returns [err res]

where err - a catched exception (reject)
res - the result of the promise work (resolve)

(go
  (let [[err res] (<! (await my-promise))]
    (println res)))
sourceraw docstring

await-cbcljs

(await-cb fnc & args)

works with functions, the last argument is the function callback

returns [err res]

err - an exception (if it happens) res - the result of the work of the callback function (nil - if there was an exception)

(go (let [[err res] (<! (await-cb my-callback))] (println res)))

works with functions, the last argument is the function callback

returns [err res]

err - an exception (if it happens)
res - the result of the work of the callback function (nil - if there was an exception)

(go
  (let [[err res] (<! (await-cb my-callback))]
    (println res)))
sourceraw docstring

clear-timeoutcljs

source

set-timeoutcljs

source

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

× close