Last active
August 29, 2015 14:25
-
-
Save getify/8103b73af1a27c133a7b to your computer and use it in GitHub Desktop.
adapting an ASQ instance to an observable
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
| ASQ.extend("toObservable",function __build__(api,internals){ | |
| return function __toObsv__() { | |
| return Rx.Observable.create(function(observer) { | |
| api.val(function(msg){ | |
| observer.onNext(msg); | |
| return ASQ.messages.apply(ø,arguments); | |
| }); | |
| }); | |
| }; | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment