MCPcopy Index your code
hub / github.com/smallfawn/QLScriptPublic / addSearch

Function addSearch

wxapp/hisense_aijia.js:212–218  ·  view source on GitHub ↗
(url, params = {})

Source from the content-addressed store, hash-verified

210}
211
212function addSearch(url, params = {}) {
213 const u = new URL(url);
214 Object.entries(params).forEach(([key, val]) => {
215 if (val !== undefined && val !== null && val !== "") u.searchParams.set(key, String(val));
216 });
217 return u.toString();
218}
219
220async function request(method, base, urlPath, data = {}, options = {}) {
221 const url = urlPath.startsWith("http") ? urlPath : `${base}${urlPath}`;

Callers 1

pointSignMethod · 0.85

Calls 2

forEachMethod · 0.80
setMethod · 0.45

Tested by

no test coverage detected