Last active
December 17, 2015 10:39
-
-
Save rarous/5596919 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (ns rx-cljs-demo.client | |
| (:use [domina :only [by-id]])) | |
| (def query (by-id "query")) | |
| (def obs (Rx/Observable/fromEvent query "keyup")) | |
| (-> obs | |
| (.map #(.-value query)) | |
| (.filter #(> (count %) 3)) | |
| (.throttle 500) | |
| (.subscribe | |
| (fn [v] (js/alert v) nil) | |
| (fn [err] (js/alert err) nil) | |
| (fn [] (js/alert "Done")))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment