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

Function extractBody

github-actions/browserstack/set-browserstack-env.js:5621–5769  ·  view source on GitHub ↗
(object, keepalive = false)

Source from the content-addressed store, hash-verified

5619 ++start;
5620 }
5621 return input.subarray(position.position, position.position = start);
5622 }
5623 function removeChars(buf, leading, trailing, predicate) {
5624 let lead = 0;
5625 let trail = buf.length - 1;
5626 if (leading) {
5627 while (lead < buf.length && predicate(buf[lead]))
5628 lead++;
5629 }
5630 if (trailing) {
5631 while (trail > 0 && predicate(buf[trail]))
5632 trail--;
5633 }
5634 return lead === 0 && trail === buf.length - 1 ? buf : buf.subarray(lead, trail + 1);
5635 }
5636 function bufferStartsWith(buffer, start, position) {
5637 if (buffer.length < start.length) {
5638 return false;
5639 }
5640 for (let i = 0; i < start.length; i++) {
5641 if (start[i] !== buffer[position.position + i]) {
5642 return false;
5643 }
5644 }
5645 return true;
5646 }
5647 module.exports = {
5648 multipartFormDataParser,
5649 validateBoundary
5650 };
5651 }
5652 });
5653
5654 //
5655 var require_body = __commonJS({
5656 ""(exports, module) {
5657 "use strict";
5658 var util = require_util();
5659 var {
5660 ReadableStreamFrom,
5661 isBlobLike,
5662 isReadableStreamLike,
5663 readableStreamClose,
5664 createDeferredPromise,
5665 fullyReadBody,
5666 extractMimeType,
5667 utf8DecodeBytes
5668 } = require_util2();
5669 var { FormData } = require_formdata();
5670 var { kState } = require_symbols2();
5671 var { webidl } = require_webidl();
5672 var { Blob: Blob2 } = __require("buffer");
5673 var assert = __require("assert");
5674 var { isErrored, isDisturbed } = __require("stream");
5675 var { isArrayBuffer } = __require("util/types");
5676 var { serializeAMimeType } = require_data_url();
5677 var { multipartFormDataParser } = require_formdata_parser();
5678 var random;

Callers 7

safelyExtractBodyFunction · 0.70
writeH1Function · 0.70
writeH2Function · 0.70
jsonMethod · 0.70
constructorMethod · 0.70
constructorMethod · 0.70
schemeFetchFunction · 0.70

Calls 11

isBlobLikeFunction · 0.70
isReadableStreamLikeFunction · 0.70
escapeFunction · 0.70
normalizeLinefeedsFunction · 0.70
__asyncGeneratorFunction · 0.70
__yieldStarFunction · 0.70
ReadableStreamFromFunction · 0.70
streamMethod · 0.45
toStringMethod · 0.45
sliceMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected