MCPcopy
hub / github.com/simstudioai/sim / finish

Function finish

apps/sim/lib/core/utils/stream-limits.ts:158–163  ·  view source on GitHub ↗
(callback: () => void)

Source from the content-addressed store, hash-verified

156 let settled = false
157
158 const finish = (callback: () => void) => {
159 if (settled) return
160 settled = true
161 cleanup()
162 callback()
163 }
164
165 const cleanup = () => {
166 stream.off('data', onData)

Callers 4

onAbortFunction · 0.70
onDataFunction · 0.70
onEndFunction · 0.70
onErrorFunction · 0.70

Calls 1

cleanupFunction · 0.70

Tested by

no test coverage detected