mirror of
https://github.com/biobulkbende/biobulkbende.org.git
synced 2024-12-27 05:15:25 +00:00
12 lines
620 B
JavaScript
12 lines
620 B
JavaScript
import { ReplaySubject } from '../ReplaySubject';
|
|
import { multicast } from './multicast';
|
|
/* tslint:enable:max-line-length */
|
|
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
|