I am using RxJS 5 and have this method:
Queue.prototype.drain = function (obs, opts) {};
in the method, I would like to check if the user passed in an Observable
for the first argument or if they omitted the Observable
and just passed in an options object.
So basically I need to do something like this:
if(!Rx.Observable.isObservable(obs)){ //this method is fictitious
opts = obs || {};
obs = Rx.Observable.interval(1000);
}
I assume RxJS provides users with this kind of check but I cannot find the documentation that shows you how to do this type checking.
Anyone know how?