(body)
| 1317 | return !!(obj != null && (typeof obj[Symbol.iterator] === "function" || typeof obj[Symbol.asyncIterator] === "function")); |
| 1318 | } |
| 1319 | function bodyLength(body) { |
| 1320 | if (body == null) { |
| 1321 | return 0; |
| 1322 | } else if (isStream(body)) { |
| 1323 | const state = body._readableState; |
| 1324 | return state && state.objectMode === false && state.ended === true && Number.isFinite(state.length) ? state.length : null; |
| 1325 | } else if (isBlobLike(body)) { |
| 1326 | return body.size != null ? body.size : null; |
| 1327 | } else if (isBuffer(body)) { |
| 1328 | return body.byteLength; |
| 1329 | } |
| 1330 | return null; |
| 1331 | } |
| 1332 | function isDestroyed(body) { |
| 1333 | var _a; |
| 1334 | return body && !!(body.destroyed || body[kDestroyed] || ((_a = stream.isDestroyed) == null ? void 0 : _a.call(stream, body))); |
no test coverage detected