MCPcopy Create free account
hub / github.com/freecodexyz/free-code / flush

Function flush

src/utils/bufferedWriter.ts:37–47  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35 }
36
37 function flush(): void {
38 if (pendingOverflow) {
39 writeFn(pendingOverflow.join(''))
40 pendingOverflow = null
41 }
42 if (buffer.length === 0) return
43 writeFn(buffer.join(''))
44 buffer = []
45 bufferBytes = 0
46 clearTimer()
47 }
48
49 function scheduleFlush(): void {
50 if (!flushTimer) {

Callers 1

disposeFunction · 0.70

Calls 2

writeFnFunction · 0.85
clearTimerFunction · 0.70

Tested by

no test coverage detected