(stream4)
| 69397 | LineDecoder.NEWLINE_REGEXP = /\r\n|[\n\r]/g; |
| 69398 | function partition(str2, delimiter) { |
| 69399 | const index = str2.indexOf(delimiter); |
| 69400 | if (index !== -1) { |
| 69401 | return [str2.substring(0, index), delimiter, str2.substring(index + delimiter.length)]; |
| 69402 | } |
| 69403 | return [str2, "", ""]; |
| 69404 | } |
| 69405 | function readableStreamAsyncIterable(stream4) { |
| 69406 | if (stream4[Symbol.asyncIterator]) |
| 69407 | return stream4; |
| 69408 | const reader = stream4.getReader(); |
| 69409 | return { |
| 69410 | async next() { |
| 69411 | try { |
| 69412 | const result = await reader.read(); |
| 69413 | if (result?.done) |
| 69414 | reader.releaseLock(); |
| 69415 | return result; |
| 69416 | } catch (e3) { |
| 69417 | reader.releaseLock(); |
| 69418 | throw e3; |
| 69419 | } |
| 69420 | }, |
| 69421 | async return() { |
| 69422 | const cancelPromise = reader.cancel(); |
| 69423 | reader.releaseLock(); |
| 69424 | await cancelPromise; |
| 69425 | return { done: true, value: void 0 }; |
| 69426 | }, |
| 69427 | [Symbol.asyncIterator]() { |
| 69428 | return this; |
no test coverage detected