Front end of the Slack clone application.

publishReplay.js 620B

123456789101112
  1. import { ReplaySubject } from '../ReplaySubject';
  2. import { multicast } from './multicast';
  3. /* tslint:enable:max-line-length */
  4. export function publishReplay(bufferSize, windowTime, selectorOrScheduler, scheduler) {
  5. if (selectorOrScheduler && typeof selectorOrScheduler !== 'function') {
  6. scheduler = selectorOrScheduler;
  7. }
  8. const selector = typeof selectorOrScheduler === 'function' ? selectorOrScheduler : undefined;
  9. const subject = new ReplaySubject(bufferSize, windowTime, scheduler);
  10. return (source) => multicast(() => subject, selector)(source);
  11. }
  12. //# sourceMappingURL=publishReplay.js.map