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

Method isEmpty

packages/effect/src/PubSub.ts:2150–2170  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2148 }
2149
2150 isEmpty(): boolean {
2151 if (this.unsubscribed) {
2152 return true
2153 }
2154 let empty = true
2155 let loop = true
2156 while (loop) {
2157 if (this.subscriberHead === this.self.publisherTail) {
2158 loop = false
2159 } else {
2160 if (this.subscriberHead.next!.value !== AbsentValue) {
2161 empty = false
2162 loop = false
2163 } else {
2164 this.subscriberHead = this.subscriberHead.next!
2165 this.subscriberIndex += 1
2166 }
2167 }
2168 }
2169 return empty
2170 }
2171
2172 size() {
2173 if (this.unsubscribed) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected