MCPcopy Index your code
hub / github.com/di-sukharev/opencommit / collectAnHTTPQuotedString

Function collectAnHTTPQuotedString

out/cli.cjs:51643–51675  ·  view source on GitHub ↗
(input, position, extractValue)

Source from the content-addressed store, hash-verified

51641 }
51642 const binary = atob2(data);
51643 const bytes = new Uint8Array(binary.length);
51644 for (let byte = 0; byte < binary.length; byte++) {
51645 bytes[byte] = binary.charCodeAt(byte);
51646 }
51647 return bytes;
51648 }
51649 function collectAnHTTPQuotedString(input, position, extractValue) {
51650 const positionStart = position.position;
51651 let value = "";
51652 assert2(input[position.position] === '"');
51653 position.position++;
51654 while (true) {
51655 value += collectASequenceOfCodePoints(
51656 (char) => char !== '"' && char !== "\\",
51657 input,
51658 position
51659 );
51660 if (position.position >= input.length) {
51661 break;
51662 }
51663 const quoteOrBackslash = input[position.position];
51664 position.position++;
51665 if (quoteOrBackslash === "\\") {
51666 if (position.position >= input.length) {
51667 value += "\\";
51668 break;
51669 }
51670 value += input[position.position];
51671 position.position++;
51672 } else {
51673 assert2(quoteOrBackslash === '"');
51674 break;
51675 }
51676 }
51677 if (extractValue) {
51678 return value;

Callers 1

parseMIMETypeFunction · 0.85

Calls 2

sliceMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…