a zip code crypto-currency system good for red ONLY

publish.js 1.1KB

123456789101112131415161718192021222324
  1. /** PURE_IMPORTS_START .._Subject,._multicast PURE_IMPORTS_END */
  2. import { Subject } from '../Subject';
  3. import { multicast } from './multicast';
  4. /* tslint:enable:max-line-length */
  5. /**
  6. * Returns a ConnectableObservable, which is a variety of Observable that waits until its connect method is called
  7. * before it begins emitting items to those Observers that have subscribed to it.
  8. *
  9. * <img src="./img/publish.png" width="100%">
  10. *
  11. * @param {Function} [selector] - Optional selector function which can use the multicasted source sequence as many times
  12. * as needed, without causing multiple subscriptions to the source sequence.
  13. * Subscribers to the given source will receive all notifications of the source from the time of the subscription on.
  14. * @return A ConnectableObservable that upon connection causes the source Observable to emit items to its Observers.
  15. * @method publish
  16. * @owner Observable
  17. */
  18. export function publish(selector) {
  19. return selector ?
  20. multicast(function () { return new Subject(); }, selector) :
  21. multicast(new Subject());
  22. }
  23. //# sourceMappingURL=publish.js.map