MCPcopy
hub / github.com/unjs/ofetch / normalizeQueryValue

Function normalizeQueryValue

src/utils.url.ts:105–119  ·  view source on GitHub ↗
(value: QueryValue)

Source from the content-addressed store, hash-verified

103}
104
105function normalizeQueryValue(value: QueryValue): string {
106 if (value === null) {
107 return "";
108 }
109
110 if (typeof value === "number" || typeof value === "boolean") {
111 return String(value);
112 }
113
114 if (typeof value === "object") {
115 return JSON.stringify(value);
116 }
117
118 return String(value);
119}

Callers 1

withQueryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…