source: trip-planner-front/node_modules/rxjs/_esm2015/internal/util/toSubscriber.js@ eed0bf8

Last change on this file since eed0bf8 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 689 bytes
Line 
1import { Subscriber } from '../Subscriber';
2import { rxSubscriber as rxSubscriberSymbol } from '../symbol/rxSubscriber';
3import { empty as emptyObserver } from '../Observer';
4export function toSubscriber(nextOrObserver, error, complete) {
5 if (nextOrObserver) {
6 if (nextOrObserver instanceof Subscriber) {
7 return nextOrObserver;
8 }
9 if (nextOrObserver[rxSubscriberSymbol]) {
10 return nextOrObserver[rxSubscriberSymbol]();
11 }
12 }
13 if (!nextOrObserver && !error && !complete) {
14 return new Subscriber(emptyObserver);
15 }
16 return new Subscriber(nextOrObserver, error, complete);
17}
18//# sourceMappingURL=toSubscriber.js.map
Note: See TracBrowser for help on using the repository browser.