(chan->obj-promise chan)
convert the next value of a channel into a Promise
convert the next value of a channel into a Promise - Project will reject if next val is nil - Promise values will be #js converted with clj->js
(chan->promise chan)
convert a channel into a Promise
convert a channel into a Promise - value of Promise can not be nil (Promise reject if chan emits a nil)
(from-promise promise)
(from-promise promise value-handler failure-handler)
turn a promise into a channel
turn a promise into a channel - channel will emit Promise value and then close - truthy Promise values go through js->clj, which works for primitives and js Objects - non-truthy Promise values are sent as the keyword :done - Promise errors are sent as a map with a {:failure key}
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close