-
-
Save xgrommx/cf07e34e547fcca5b04c 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