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

Method jsonToStr

tools/env.js:77–85  ·  view source on GitHub ↗
(obj, c = '&', encodeUrl = false)

Source from the content-addressed store, hash-verified

75 return "undefined" != typeof module && !!module.exports;
76 }
77 jsonToStr(obj, c = '&', encodeUrl = false) {
78 let ret = []
79 for (let keys of Object.keys(obj).sort()) {
80 let v = obj[keys]
81 if (v && encodeUrl) v = encodeURIComponent(v)
82 ret.push(keys + '=' + v)
83 }
84 return ret.join(c);
85 }
86 getURLParams(url) {
87 try { return Object.fromEntries(new URL(url, "http://localhost").searchParams) } catch { return {} }
88 }

Callers 7

calculateSignMethod · 0.80
loginMethod · 0.80
getInfoMethod · 0.80
getSignStatusMethod · 0.80
thumbsupMethod · 0.80
viewVideoAddMethod · 0.80
doFollowMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected