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.

mapTo.js 579B

12345678910111213141516171819202122
  1. import { Subscriber } from '../Subscriber';
  2. export function mapTo(value) {
  3. return (source) => source.lift(new MapToOperator(value));
  4. }
  5. class MapToOperator {
  6. constructor(value) {
  7. this.value = value;
  8. }
  9. call(subscriber, source) {
  10. return source.subscribe(new MapToSubscriber(subscriber, this.value));
  11. }
  12. }
  13. class MapToSubscriber extends Subscriber {
  14. constructor(destination, value) {
  15. super(destination);
  16. this.value = value;
  17. }
  18. _next(x) {
  19. this.destination.next(this.value);
  20. }
  21. }
  22. //# sourceMappingURL=mapTo.js.map