MCPcopy Index your code
hub / github.com/varHarrie/varharrie.github.io / toQuery

Function toQuery

src/services/github.ts:130–138  ·  view source on GitHub ↗
(raw: Record<string, unknown>)

Source from the content-addressed store, hash-verified

128};
129
130function toQuery(raw: Record<string, unknown>) {
131 const params = new URLSearchParams();
132
133 Object.keys(raw).forEach((key) => {
134 if (raw[key]) params.append(key, String(raw[key]));
135 });
136
137 return `?${params.toString()}`;
138}
139
140function hasBody(method: string) {
141 return ['POST', 'PUT', 'PATCH'].includes(method);

Callers 1

requestMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected