MCPcopy Index your code
hub / github.com/di-sukharev/opencommit / flush

Method flush

out/cli.cjs:69380–69388  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

69378 if (bytes instanceof Uint8Array || bytes instanceof ArrayBuffer) {
69379 this.textDecoder ?? (this.textDecoder = new TextDecoder("utf8"));
69380 return this.textDecoder.decode(bytes);
69381 }
69382 throw new AnthropicError(`Unexpected: received non-Uint8Array/ArrayBuffer (${bytes.constructor.name}) in a web platform. Please report this error.`);
69383 }
69384 throw new AnthropicError(`Unexpected: neither Buffer nor TextDecoder are available as globals. Please report this error.`);
69385 }
69386 flush() {
69387 if (!this.buffer.length && !this.trailingCR) {
69388 return [];
69389 }
69390 const lines = [this.buffer.join("")];
69391 this.buffer = [];

Callers 5

constructorMethod · 0.80
iterLinesMethod · 0.80
_iterSSEMessagesFunction · 0.80
_iterSSEMessages2Function · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected