hugoWebsite/node_modules/rxjs/dist/esm5/internal/operators/publishReplay.js

11 lines
619 B
JavaScript
Raw Normal View History

2022-10-29 00:20:35 +02:00
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;
}
var selector = isFunction(selectorOrScheduler) ? selectorOrScheduler : undefined;
return function (source) { return multicast(new ReplaySubject(bufferSize, windowTime, timestampProvider), selector)(source); };
}
//# sourceMappingURL=publishReplay.js.map