You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
603 B
JavaScript
11 lines
603 B
JavaScript
import { ReplaySubject } from '../ReplaySubject';
|
|
import { multicast } from './multicast';
|
|
import { isFunction } from '../util/isFunction';
|
|
export function publishReplay(bufferSize, windowTime, selectorOrScheduler, timestampProvider) {
|
|
if (selectorOrScheduler && !isFunction(selectorOrScheduler)) {
|
|
timestampProvider = selectorOrScheduler;
|
|
}
|
|
const selector = isFunction(selectorOrScheduler) ? selectorOrScheduler : undefined;
|
|
return (source) => multicast(new ReplaySubject(bufferSize, windowTime, timestampProvider), selector)(source);
|
|
}
|
|
//# sourceMappingURL=publishReplay.js.map
|