diff options
Diffstat (limited to 'node_modules/rxjs/dist/esm5/internal/operators/connect.js')
| -rw-r--r-- | node_modules/rxjs/dist/esm5/internal/operators/connect.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/node_modules/rxjs/dist/esm5/internal/operators/connect.js b/node_modules/rxjs/dist/esm5/internal/operators/connect.js new file mode 100644 index 0000000..3ffd469 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/connect.js @@ -0,0 +1,17 @@ +import { Subject } from '../Subject'; +import { innerFrom } from '../observable/innerFrom'; +import { operate } from '../util/lift'; +import { fromSubscribable } from '../observable/fromSubscribable'; +var DEFAULT_CONFIG = { + connector: function () { return new Subject(); }, +}; +export function connect(selector, config) { + if (config === void 0) { config = DEFAULT_CONFIG; } + var connector = config.connector; + return operate(function (source, subscriber) { + var subject = connector(); + innerFrom(selector(fromSubscribable(subject))).subscribe(subscriber); + subscriber.add(source.subscribe(subject)); + }); +} +//# sourceMappingURL=connect.js.map
\ No newline at end of file |
