publishBehavior.js 593 B

12345678910111213
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.publishBehavior = void 0;
  4. var BehaviorSubject_1 = require("../BehaviorSubject");
  5. var ConnectableObservable_1 = require("../observable/ConnectableObservable");
  6. function publishBehavior(initialValue) {
  7. return function (source) {
  8. var subject = new BehaviorSubject_1.BehaviorSubject(initialValue);
  9. return new ConnectableObservable_1.ConnectableObservable(source, function () { return subject; });
  10. };
  11. }
  12. exports.publishBehavior = publishBehavior;
  13. //# sourceMappingURL=publishBehavior.js.map