Liking cljdoc? Tell your friends :D

atomist.promise


chan->obj-promisecljs

(chan->obj-promise chan)

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
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
raw docstring

chan->promisecljs

(chan->promise chan)

convert a channel into a Promise

  • value of Promise can not be nil (Promise reject if chan emits a nil)
convert a channel into a Promise
- value of Promise can not be nil (Promise reject if chan emits a nil)
raw docstring

from-promisecljs

(from-promise promise)
(from-promise promise value-handler failure-handler)

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}
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}
raw docstring

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

× close