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

Function safelyExtractBody

deps/undici/undici.js:6831–6837  ·  view source on GitHub ↗
(object, keepalive = false)

Source from the content-addressed store, hash-verified

6829 }
6830 __name(extractBody, "extractBody");
6831 function safelyExtractBody(object, keepalive = false) {
6832 if (webidl.is.ReadableStream(object)) {
6833 assert(!util.isDisturbed(object), "The body has already been consumed.");
6834 assert(!object.locked, "The stream is locked.");
6835 }
6836 return extractBody(object, keepalive);
6837 }
6838 __name(safelyExtractBody, "safelyExtractBody");
6839 function cloneBody(body) {
6840 const { 0: out1, 1: out2 } = body.stream.tee();

Callers 4

mainFetchFunction · 0.70
schemeFetchFunction · 0.70
httpRedirectFetchFunction · 0.70
httpNetworkOrCacheFetchFunction · 0.70

Calls 2

extractBodyFunction · 0.70
assertFunction · 0.50

Tested by

no test coverage detected