publishBehavior.js 380 B

123456789
  1. import { BehaviorSubject } from '../BehaviorSubject';
  2. import { ConnectableObservable } from '../observable/ConnectableObservable';
  3. export function publishBehavior(initialValue) {
  4. return (source) => {
  5. const subject = new BehaviorSubject(initialValue);
  6. return new ConnectableObservable(source, () => subject);
  7. };
  8. }
  9. //# sourceMappingURL=publishBehavior.js.map