aboutsummaryrefslogtreecommitdiffstats
path: root/node_modules/rxjs/dist/esm/internal/operators/connect.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/rxjs/dist/esm/internal/operators/connect.js')
-rw-r--r--node_modules/rxjs/dist/esm/internal/operators/connect.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/node_modules/rxjs/dist/esm/internal/operators/connect.js b/node_modules/rxjs/dist/esm/internal/operators/connect.js
new file mode 100644
index 0000000..9d3e6dd
--- /dev/null
+++ b/node_modules/rxjs/dist/esm/internal/operators/connect.js
@@ -0,0 +1,16 @@
+import { Subject } from '../Subject';
+import { innerFrom } from '../observable/innerFrom';
+import { operate } from '../util/lift';
+import { fromSubscribable } from '../observable/fromSubscribable';
+const DEFAULT_CONFIG = {
+ connector: () => new Subject(),
+};
+export function connect(selector, config = DEFAULT_CONFIG) {
+ const { connector } = config;
+ return operate((source, subscriber) => {
+ const 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