(body)
| 274 | } |
| 275 | |
| 276 | function cloneBody (body) { |
| 277 | // To clone a body body, run these steps: |
| 278 | |
| 279 | // https://fetch.spec.whatwg.org/#concept-body-clone |
| 280 | |
| 281 | // 1. Let « out1, out2 » be the result of teeing body’s stream. |
| 282 | const { 0: out1, 1: out2 } = body.stream.tee() |
| 283 | |
| 284 | // 2. Set body’s stream to out1. |
| 285 | body.stream = out1 |
| 286 | |
| 287 | // 3. Return a body whose stream is out2 and other members are copied from body. |
| 288 | return { |
| 289 | stream: out2, |
| 290 | length: body.length, |
| 291 | source: body.source |
| 292 | } |
| 293 | } |
| 294 | |
| 295 | function bodyMixinMethods (instance, getInternalState) { |
| 296 | const methods = { |
no test coverage detected