initial commit - far from runnable
This commit is contained in:
commit
db057ce342
8614 changed files with 1032171 additions and 0 deletions
16
node_modules/rxjs/dist/esm/internal/operators/connect.js
generated
vendored
Normal file
16
node_modules/rxjs/dist/esm/internal/operators/connect.js
generated
vendored
Normal file
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue