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

17 lines
811 B
JavaScript
Raw Normal View History

2022-06-08 10:36:39 +00:00
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.multicast = void 0;
var ConnectableObservable_1 = require("../observable/ConnectableObservable");
var isFunction_1 = require("../util/isFunction");
var connect_1 = require("./connect");
function multicast(subjectOrSubjectFactory, selector) {
var subjectFactory = isFunction_1.isFunction(subjectOrSubjectFactory) ? subjectOrSubjectFactory : function () { return subjectOrSubjectFactory; };
if (isFunction_1.isFunction(selector)) {
return connect_1.connect(selector, {
connector: subjectFactory,
});
}
return function (source) { return new ConnectableObservable_1.ConnectableObservable(source, subjectFactory); };
}
exports.multicast = multicast;
//# sourceMappingURL=multicast.js.map