项目原始demo,不改动
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
Bu depo arşivlendi. Dosyaları görüntüleyebilir ve klonlayabilirsiniz ama işlem gönderemez ve konu/değişiklik isteği açamazsınız.
 
 
 
 

31 satır
768 B

  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. /**
  11. * We need this JSDoc comment for affecting ESDoc.
  12. * @ignore
  13. * @extends {Ignored}
  14. */
  15. class IsEmptySubscriber extends Subscriber {
  16. constructor(destination) {
  17. super(destination);
  18. }
  19. notifyComplete(isEmpty) {
  20. const destination = this.destination;
  21. destination.next(isEmpty);
  22. destination.complete();
  23. }
  24. _next(value) {
  25. this.notifyComplete(false);
  26. }
  27. _complete() {
  28. this.notifyComplete(true);
  29. }
  30. }
  31. //# sourceMappingURL=isEmpty.js.map