aboutsummaryrefslogtreecommitdiffstats
path: root/node_modules/rxjs/dist/esm5/internal/operators/connect.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/rxjs/dist/esm5/internal/operators/connect.js')
-rw-r--r--node_modules/rxjs/dist/esm5/internal/operators/connect.js17
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
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage