wishthis/node_modules/rxjs/_esm2015/internal/operators/publishReplay.js
2022-01-21 09:28:41 +01:00

11 lines
No EOL
584 B
JavaScript

import { ReplaySubject } from '../ReplaySubject';
import { multicast } from './multicast';
export function publishReplay(bufferSize, windowTime, selectorOrScheduler, scheduler) {
if (selectorOrScheduler && typeof selectorOrScheduler !== 'function') {
scheduler = selectorOrScheduler;
}
const selector = typeof selectorOrScheduler === 'function' ? selectorOrScheduler : undefined;
const subject = new ReplaySubject(bufferSize, windowTime, scheduler);
return (source) => multicast(() => subject, selector)(source);
}
//# sourceMappingURL=publishReplay.js.map