wishthis/node_modules/rxjs/dist/esm/internal/operators/multicast.js
2022-06-08 12:36:39 +02:00

13 lines
No EOL
585 B
JavaScript

import { ConnectableObservable } from '../observable/ConnectableObservable';
import { isFunction } from '../util/isFunction';
import { connect } from './connect';
export function multicast(subjectOrSubjectFactory, selector) {
const subjectFactory = isFunction(subjectOrSubjectFactory) ? subjectOrSubjectFactory : () => subjectOrSubjectFactory;
if (isFunction(selector)) {
return connect(selector, {
connector: subjectFactory,
});
}
return (source) => new ConnectableObservable(source, subjectFactory);
}
//# sourceMappingURL=multicast.js.map