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

Function pickTasks

wxapp/ctrip.js:136–147  ·  view source on GitHub ↗
(data = {})

Source from the content-addressed store, hash-verified

134}
135
136function pickTasks(data = {}) {
137 const keys = ["taskList", "todoTaskList", "finishTaskList", "filteredTaskList"];
138 const map = new Map();
139 for (const key of keys) {
140 const list = Array.isArray(data[key]) ? data[key] : [];
141 for (const item of list) {
142 const id = taskId(item);
143 if (id && !map.has(String(id))) map.set(String(id), item);
144 }
145 }
146 return [...map.values()];
147}
148
149async function gateway(pathname, data) {
150 const res = await axios.post(`${PASSPORT_BASE}/${pathname}`, JSON.stringify(data), {

Callers 1

queryTaskListMethod · 0.85

Calls 2

taskIdFunction · 0.85
setMethod · 0.45

Tested by

no test coverage detected