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 676B

1234567891011121314151617181920212223242526
  1. import { Subscriber } from '../Subscriber';
  2. export function isEmpty() {
  3. return (source) => source.lift(new IsEmptyOperator());
  4. }
  5. class IsEmptyOperator {
  6. call(observer, source) {
  7. return source.subscribe(new IsEmptySubscriber(observer));
  8. }
  9. }
  10. class IsEmptySubscriber extends Subscriber {
  11. constructor(destination) {
  12. super(destination);
  13. }
  14. notifyComplete(isEmpty) {
  15. const destination = this.destination;
  16. destination.next(isEmpty);
  17. destination.complete();
  18. }
  19. _next(value) {
  20. this.notifyComplete(false);
  21. }
  22. _complete() {
  23. this.notifyComplete(true);
  24. }
  25. }
  26. //# sourceMappingURL=isEmpty.js.map