Repositorio del curso CCOM4030 el semestre B91 del proyecto Artesanías con el Instituto de Cultura

materialize.js 946B

12345678910111213141516171819202122232425262728293031
  1. import { Subscriber } from '../Subscriber';
  2. import { Notification } from '../Notification';
  3. export function materialize() {
  4. return function materializeOperatorFunction(source) {
  5. return source.lift(new MaterializeOperator());
  6. };
  7. }
  8. class MaterializeOperator {
  9. call(subscriber, source) {
  10. return source.subscribe(new MaterializeSubscriber(subscriber));
  11. }
  12. }
  13. class MaterializeSubscriber extends Subscriber {
  14. constructor(destination) {
  15. super(destination);
  16. }
  17. _next(value) {
  18. this.destination.next(Notification.createNext(value));
  19. }
  20. _error(err) {
  21. const destination = this.destination;
  22. destination.next(Notification.createError(err));
  23. destination.complete();
  24. }
  25. _complete() {
  26. const destination = this.destination;
  27. destination.next(Notification.createComplete());
  28. destination.complete();
  29. }
  30. }
  31. //# sourceMappingURL=materialize.js.map