wishthis/node_modules/rxjs/dist/esm5/internal/operators/multicast.js

13 lines
619 B
JavaScript
Raw Normal View History

2022-06-08 10:36:39 +00:00
import { ConnectableObservable } from '../observable/ConnectableObservable';
import { isFunction } from '../util/isFunction';
import { connect } from './connect';
export function multicast(subjectOrSubjectFactory, selector) {
var subjectFactory = isFunction(subjectOrSubjectFactory) ? subjectOrSubjectFactory : function () { return subjectOrSubjectFactory; };
if (isFunction(selector)) {
return connect(selector, {
connector: subjectFactory,
});
}
return function (source) { return new ConnectableObservable(source, subjectFactory); };
}
//# sourceMappingURL=multicast.js.map