()
| 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 = []; |
no outgoing calls
no test coverage detected