How to use the isObservable function from rxjs

Find comprehensive JavaScript rxjs.isObservable code examples handpicked from public code repositorys.

34
35
36
37
38
39
40
41
42
43
exports.Notification = rxjs.Notification;
exports.NotificationKind = rxjs.NotificationKind;
exports.pipe = rxjs.pipe;
exports.noop = rxjs.noop;
exports.identity = rxjs.identity;
exports.isObservable = rxjs.isObservable;
exports.ArgumentOutOfRangeError = rxjs.ArgumentOutOfRangeError;
exports.EmptyError = rxjs.EmptyError;
exports.ObjectUnsubscribedError = rxjs.ObjectUnsubscribedError;
exports.UnsubscriptionError = rxjs.UnsubscriptionError;
fork icon299
star icon0
watch icon1

535
536
537
538
539
540
541
542
543
544

const getValue = (value, [path, ...rest]) => {
  if (!path || !value || typeof value !== 'object') {
    return Observable.isObservable(value) ? value : Observable.of(value)
  } else {
    return Observable.isObservable(value)
      ? value.pipe(
          rx.switchMap((value) => getValue(value[path], rest)),
          rx.distinctUntilChanged()
        )
fork icon4
star icon3
watch icon5

143
144
145
146
147
148
149
150
151
152
ExcelComponent.prototype.save = function (component) {
    var _this = this;
    var result = this.fetchData ? this.fetchData(component) : null;
    this.excelService.toggleLoading(true);
    this.zone.runOutsideAngular(function () {
        if (result && rxjs_1.isObservable(result.data)) {
            _this.dataSubscription = result.data.pipe(operators_1.take(1)).subscribe(function (data) {
                _this.dataSubscription = null;
                _this.exportData(component, {
                    data: data,
fork icon0
star icon0
watch icon0