MCPcopy Create free account
hub / github.com/smallfawn/QLScriptPublic / parseEntries

Function parseEntries

wxapp/jingjianx_all.js:245–262  ·  view source on GitHub ↗
(raw = "")

Source from the content-addressed store, hash-verified

243}
244
245function parseEntries(raw = "") {
246 if (!raw.trim()) return [];
247 if (/^\s*[\[{]/.test(raw)) {
248 try {
249 const data = JSON.parse(raw);
250 if (Array.isArray(data)) return data.map(String).filter(Boolean);
251 if (data && typeof data === "object") {
252 return Object.entries(data).map(([key, value]) => `${key}=${value}`);
253 }
254 } catch {
255 return [];
256 }
257 }
258 return raw
259 .split(/[\n&;|]+/)
260 .map((item) => item.trim())
261 .filter(Boolean);
262}
263
264function resolveAccounts(app, totalEntries) {
265 const entries = totalEntries.length ? totalEntries : parseEntries(process.env[app.ck] || "");

Callers 2

resolveAccountsFunction · 0.85
jingjianx_all.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected