MCPcopy Create free account
hub / github.com/Effect-TS/effect / publishAll

Method publishAll

packages/effect/src/PubSub.ts:2099–2108  ·  view source on GitHub ↗
(elements: Iterable<A>)

Source from the content-addressed store, hash-verified

2097 }
2098
2099 publishAll(elements: Iterable<A>): Array<A> {
2100 if (this.publisherTail.subscribers !== 0) {
2101 for (const a of elements) {
2102 this.publish(a)
2103 }
2104 } else if (this.replayBuffer) {
2105 this.replayBuffer.offerAll(elements)
2106 }
2107 return []
2108 }
2109
2110 slide(): void {
2111 if (this.publisherHead !== this.publisherTail) {

Callers

nothing calls this directly

Calls 2

publishMethod · 0.95
offerAllMethod · 0.80

Tested by

no test coverage detected