The aim of this wrapper is to let developers write this:
(defn project-range [n] (return-value (range n))) (-> (from-array [4 6 8]) (select-many project-range) (subscribe #(.log js/console (clj->js %))))
(defn project-range [n] (.returnValue js/Rx.Observable (range n))) (-> (.fromArray js/Rx.Observable (clj->js [1 2 3])) (.selectMany project-range) (.subscribe #(.log js/console (clj->js %))))
Be warned: it's very early days and this wrapper is still very much incomplete.
For the brave amongst you, add this to your
Or if you're using maven:
<dependency> <groupId>com.leonardoborges</groupId> <artifactId>rx-cljs</artifactId> <version>0.0.2-SNAPSHOT</version> </dependency>
For a sample app that uses this wrapper, check out this repository.
What's in the package
Working with Observables
Working with Connectable observables
Working with Observers
Working with Subscriptions
Running the tests
From the project root:
$ lein cljsbuild test
Everything else. (but mainly other arities of functions already in here.)
Bug reports and pull requests are much welcome. If submitting code, please add a test to it.
Copyright (C) 2013 Leonardo Borges
Distributed under the Eclipse Public License, the same as Clojure.