Last change
on this file since fa375fe was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | /** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
|
---|
2 | import * as tslib_1 from "tslib";
|
---|
3 | import { Subscriber } from '../Subscriber';
|
---|
4 | export function isEmpty() {
|
---|
5 | return function (source) { return source.lift(new IsEmptyOperator()); };
|
---|
6 | }
|
---|
7 | var IsEmptyOperator = /*@__PURE__*/ (function () {
|
---|
8 | function IsEmptyOperator() {
|
---|
9 | }
|
---|
10 | IsEmptyOperator.prototype.call = function (observer, source) {
|
---|
11 | return source.subscribe(new IsEmptySubscriber(observer));
|
---|
12 | };
|
---|
13 | return IsEmptyOperator;
|
---|
14 | }());
|
---|
15 | var IsEmptySubscriber = /*@__PURE__*/ (function (_super) {
|
---|
16 | tslib_1.__extends(IsEmptySubscriber, _super);
|
---|
17 | function IsEmptySubscriber(destination) {
|
---|
18 | return _super.call(this, destination) || this;
|
---|
19 | }
|
---|
20 | IsEmptySubscriber.prototype.notifyComplete = function (isEmpty) {
|
---|
21 | var destination = this.destination;
|
---|
22 | destination.next(isEmpty);
|
---|
23 | destination.complete();
|
---|
24 | };
|
---|
25 | IsEmptySubscriber.prototype._next = function (value) {
|
---|
26 | this.notifyComplete(false);
|
---|
27 | };
|
---|
28 | IsEmptySubscriber.prototype._complete = function () {
|
---|
29 | this.notifyComplete(true);
|
---|
30 | };
|
---|
31 | return IsEmptySubscriber;
|
---|
32 | }(Subscriber));
|
---|
33 | //# sourceMappingURL=isEmpty.js.map
|
---|
Note:
See
TracBrowser
for help on using the repository browser.