MCPcopy
hub / github.com/Effect-TS/effect / loop

Function loop

packages/platform-node-shared/src/internal/stream.ts:239–250  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

237 const iterator = chunk[Symbol.iterator]()
238 let next = iterator.next()
239 function loop() {
240 const item = next
241 next = iterator.next()
242 const success = writable.write(item.value, encoding as any)
243 if (next.done) {
244 resume(Effect.void)
245 } else if (success) {
246 loop()
247 } else {
248 writable.once("drain", loop)
249 }
250 }
251 loop()
252 })
253

Callers 1

writeEffectFunction · 0.70

Calls 3

nextMethod · 0.65
writeMethod · 0.65
resumeFunction · 0.50

Tested by

no test coverage detected