Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

isEmpty.js 1.2KB

123456789101112131415161718192021222324252627282930313233
  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