MCPcopy
hub / github.com/di-sukharev/opencommit / serializeAMimeType

Function serializeAMimeType

out/cli.cjs:51676–51692  ·  view source on GitHub ↗
(mimeType)

Source from the content-addressed store, hash-verified

51674 break;
51675 }
51676 }
51677 if (extractValue) {
51678 return value;
51679 }
51680 return input.slice(positionStart, position.position);
51681 }
51682 function serializeAMimeType(mimeType) {
51683 assert2(mimeType !== "failure");
51684 const { parameters, essence } = mimeType;
51685 let serialization = essence;
51686 for (let [name, value] of parameters.entries()) {
51687 serialization += ";";
51688 serialization += name;
51689 serialization += "=";
51690 if (!HTTP_TOKEN_CODEPOINTS.test(value)) {
51691 value = value.replace(/(\\|")/g, "\\$1");
51692 value = '"' + value;
51693 value += '"';
51694 }
51695 serialization += value;

Callers 4

constructorMethod · 0.85
blobFunction · 0.85
schemeFetchFunction · 0.85
packageDataFunction · 0.85

Calls 2

testMethod · 0.80
entriesMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…