MCPcopy Create free account
hub / github.com/angular/dev-infra / cloneBody

Function cloneBody

github-actions/saucelabs/set-saucelabs-env.js:5777–5785  ·  view source on GitHub ↗
(instance, body)

Source from the content-addressed store, hash-verified

5775 return [body, type];
5776 }
5777 function safelyExtractBody(object, keepalive = false) {
5778 if (object instanceof ReadableStream) {
5779 assert(!util.isDisturbed(object), "The body has already been consumed.");
5780 assert(!object.locked, "The stream is locked.");
5781 }
5782 return extractBody(object, keepalive);
5783 }
5784 function cloneBody(instance, body) {
5785 const [out1, out2] = body.stream.tee();
5786 body.stream = out1;
5787 return {
5788 stream: out2,

Callers 2

cloneResponseFunction · 0.70
cloneRequestFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected