MCPcopy Create free account
hub / github.com/nodejs/node / bodyUnusable

Function bodyUnusable

deps/undici/src/lib/web/fetch/body.js:507–514  ·  view source on GitHub ↗

* @see https://fetch.spec.whatwg.org/#body-unusable * @param {any} object internal state

(object)

Source from the content-addressed store, hash-verified

505 * @param {any} object internal state
506 */
507function bodyUnusable (object) {
508 const body = object.body
509
510 // An object including the Body interface mixin is
511 // said to be unusable if its body is non-null and
512 // its body’s stream is disturbed or locked.
513 return body != null && (body.stream.locked || util.isDisturbed(body.stream))
514}
515
516/**
517 * @see https://fetch.spec.whatwg.org/#concept-body-mime-type

Callers 5

constructorMethod · 0.70
cloneMethod · 0.70
cloneMethod · 0.70
textStreamFunction · 0.70
consumeBodyFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected