Every new change
This commit is contained in:
38
node_modules/rxjs/_esm5/internal/operators/multicast.js
generated
vendored
Normal file
38
node_modules/rxjs/_esm5/internal/operators/multicast.js
generated
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
/** PURE_IMPORTS_START _observable_ConnectableObservable PURE_IMPORTS_END */
|
||||
import { connectableObservableDescriptor } from '../observable/ConnectableObservable';
|
||||
export function multicast(subjectOrSubjectFactory, selector) {
|
||||
return function multicastOperatorFunction(source) {
|
||||
var subjectFactory;
|
||||
if (typeof subjectOrSubjectFactory === 'function') {
|
||||
subjectFactory = subjectOrSubjectFactory;
|
||||
}
|
||||
else {
|
||||
subjectFactory = function subjectFactory() {
|
||||
return subjectOrSubjectFactory;
|
||||
};
|
||||
}
|
||||
if (typeof selector === 'function') {
|
||||
return source.lift(new MulticastOperator(subjectFactory, selector));
|
||||
}
|
||||
var connectable = Object.create(source, connectableObservableDescriptor);
|
||||
connectable.source = source;
|
||||
connectable.subjectFactory = subjectFactory;
|
||||
return connectable;
|
||||
};
|
||||
}
|
||||
var MulticastOperator = /*@__PURE__*/ (function () {
|
||||
function MulticastOperator(subjectFactory, selector) {
|
||||
this.subjectFactory = subjectFactory;
|
||||
this.selector = selector;
|
||||
}
|
||||
MulticastOperator.prototype.call = function (subscriber, source) {
|
||||
var selector = this.selector;
|
||||
var subject = this.subjectFactory();
|
||||
var subscription = selector(subject).subscribe(subscriber);
|
||||
subscription.add(source.subscribe(subject));
|
||||
return subscription;
|
||||
};
|
||||
return MulticastOperator;
|
||||
}());
|
||||
export { MulticastOperator };
|
||||
//# sourceMappingURL=multicast.js.map
|
Reference in New Issue
Block a user