MCPcopy Create free account
hub / github.com/denoland/std / serializeParameters

Function serializeParameters

http/unstable_structured_fields.ts:1401–1416  ·  view source on GitHub ↗
(parameters: Parameters)

Source from the content-addressed store, hash-verified

1399}
1400
1401function serializeParameters(parameters: Parameters): string {
1402 let result = "";
1403
1404 for (const [key, value] of parameters) {
1405 validateKey(key);
1406 result += ";";
1407 result += key;
1408
1409 if (value.type !== "boolean" || value.value !== true) {
1410 result += "=";
1411 result += serializeBareItem(value);
1412 }
1413 }
1414
1415 return result;
1416}
1417
1418function validateKey(key: string): void {
1419 if (key.length === 0) {

Callers 3

serializeDictionaryFunction · 0.85
serializeInnerListFunction · 0.85
serializeItemInternalFunction · 0.85

Calls 2

validateKeyFunction · 0.85
serializeBareItemFunction · 0.85

Tested by

no test coverage detected