rxjs-complete-when
v1.1.3
Published
An RxJS Operator to follow the completion of another observable
Downloads
10
Readme
RxJS completeWhen Operator
by David Björkevik
An RxJS operator that causes an observable to complete early if/when another controlling observable completes.
This is very useful to easliy limit the lifetime of a pipe, for instance when
writing user interface modules: Set up a simple Subject called "destroyed" for
your UI component and call its .complete()
-method upon component destruction.
Now you may use .pipe(completeWhen(destroyed))
to make sure your subscriptions
are cancelled when your component is destroyed.
Installation
npm install rxjs-complete-when