(stream4)
| 80341 | LineDecoder2.NEWLINE_REGEXP = /\r\n|[\n\r]/g; |
| 80342 | function partition2(str2, delimiter) { |
| 80343 | const index = str2.indexOf(delimiter); |
| 80344 | if (index !== -1) { |
| 80345 | return [str2.substring(0, index), delimiter, str2.substring(index + delimiter.length)]; |
| 80346 | } |
| 80347 | return [str2, "", ""]; |
| 80348 | } |
| 80349 | function readableStreamAsyncIterable2(stream4) { |
| 80350 | if (stream4[Symbol.asyncIterator]) |
| 80351 | return stream4; |
| 80352 | const reader = stream4.getReader(); |
| 80353 | return { |
| 80354 | async next() { |
| 80355 | try { |
| 80356 | const result = await reader.read(); |
| 80357 | if (result?.done) |
| 80358 | reader.releaseLock(); |
| 80359 | return result; |
| 80360 | } catch (e3) { |
| 80361 | reader.releaseLock(); |
| 80362 | throw e3; |
| 80363 | } |
| 80364 | }, |
| 80365 | async return() { |
| 80366 | const cancelPromise = reader.cancel(); |
| 80367 | reader.releaseLock(); |
| 80368 | await cancelPromise; |
| 80369 | return { done: true, value: void 0 }; |
| 80370 | }, |
| 80371 | [Symbol.asyncIterator]() { |
| 80372 | return this; |
no test coverage detected