1.0.6 • Published 7 years ago

@pratico/rx-extensions v1.0.6

Weekly downloads
15
License
MIT
Repository
github
Last release
7 years ago

@pratico/rx-extensions

This package provides some Rx.js extensions created to use in the @pratico projects

1. ObservableWatcher

Allows to follow a observable and known when it starts and when it concludes.

Example:

let observable: ObservableWatched = ObservableWatcher.watch<any>(Observable.of(1));

observable.watcher.onStarted.subscribe(() => {
  console.log('Called only when the user subscribes!!!');
});

observable.watcher.onCompleted.subscribe(() => {
  console.log('Called only when the observable finished by completion or error');
});


observable.subscribe((val) => {
  console.log('Processing...', observable.watcher.processing); // returns true while the the observable is running
  console.log('Value', val); // will print Value 1
});
1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago