Skip to content

Instantly share code, notes, and snippets.

@getify
Last active August 29, 2015 14:25
Show Gist options
  • Select an option

  • Save getify/8103b73af1a27c133a7b to your computer and use it in GitHub Desktop.

Select an option

Save getify/8103b73af1a27c133a7b to your computer and use it in GitHub Desktop.
adapting an ASQ instance to an observable
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