(iterable)
| 1471 | }; |
| 1472 | } |
| 1473 | function ReadableStreamFrom(iterable) { |
| 1474 | let iterator; |
| 1475 | return new ReadableStream( |
| 1476 | { |
| 1477 | start() { |
| 1478 | return __async(this, null, function* () { |
| 1479 | iterator = iterable[Symbol.asyncIterator](); |
| 1480 | }); |
| 1481 | }, |
| 1482 | pull(controller) { |
| 1483 | return __async(this, null, function* () { |
| 1484 | const { done, value } = yield iterator.next(); |
| 1485 | if (done) { |
| 1486 | queueMicrotask(() => { |
| 1487 | var _a2; |
| 1488 | controller.close(); |
| 1489 | (_a2 = controller.byobRequest) == null ? void 0 : _a2.respond(0); |
| 1490 | }); |
| 1491 | } else { |
| 1492 | const buf = Buffer.isBuffer(value) ? value : Buffer.from(value); |
| 1493 | if (buf.byteLength) { |
| 1494 | controller.enqueue(new Uint8Array(buf)); |
| 1495 | } |
| 1496 | } |
| 1497 | return controller.desiredSize > 0; |
| 1498 | }); |
| 1499 | }, |
| 1500 | cancel(reason) { |
| 1501 | return __async(this, null, function* () { |
| 1502 | yield iterator.return(); |
| 1503 | }); |
| 1504 | }, |
| 1505 | type: "bytes" |
| 1506 | } |
| 1507 | ); |
| 1508 | } |
| 1509 | function isFormDataLike(object) { |
| 1510 | return object && typeof object === "object" && typeof object.append === "function" && typeof object.delete === "function" && typeof object.get === "function" && typeof object.getAll === "function" && typeof object.has === "function" && typeof object.set === "function" && object[Symbol.toStringTag] === "FormData"; |
| 1511 | } |
no outgoing calls
no test coverage detected